Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Word 97 to Word 2000 Word Automation Migration Problems
Message
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
Word 97 to Word 2000 Word Automation Migration Problems
Miscellaneous
Thread ID:
00448221
Message ID:
00448221
Views:
64
I have an application that contains code to do word automation. The version that is currently being used is Word 97 SR-2.

The applications has worked flawlessly for quite some time. Now it is time to test the code against Word 2000 Sr-1. My application is having an OLE exception error when the program tries to traverse through template document.

What I have found is this:

The code will open word and then add 2 DOT files. These DOT files are the templates form of where the data is to be placed. The code was set up to go to the text box in the word document and replace the data in the template with data from the database. When the templates were set up I knew that when I needed to input stock number info I would tell word to:

oWord.ActiveDocument.Shapes("Text Box 24").SELECT

This would position me to the data are where I can then enter Stock Number data. Once that data is entered I would then position the word document to the next data section.

What is happening in Word 2000 is that the same DOT template is used but the numbering of the shapes are now all different. So the program will OLE error out as there is no such thing as 'Text Box 24'.

Has anyone seen this before or a way around it?
I really do not want to have to do a rewrite of the code for Word 2000 if I dont have to or the dreaded IF Word97 then do this ELSE IF Word 2000 do this type of code?
Also does anyone have a site to go to that will detail automation changes that will have to be considered when migrating from Office 97 to Office 2000?
Bret Hobbs

"We'd have been called juvenile delinquents only our neighborhood couldn't afford a sociologist." Bob Hope
Reply
Map
View

Click here to load this message in the networking platform