Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Having a problem with Word & FoxPro
Message
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Having a problem with Word & FoxPro
Miscellaneous
Thread ID:
00335861
Message ID:
00335861
Views:
40
Can someone help with an OLE Automation problem ? I keep getting a syntax error at the last line. This is the sample code:

oWord = CREATEOBJECT("word.application")
oWord.Visible = .t.
myDocument = "c:\mysample.doc"
oWord.documents.open(myDocument)

oWord.Selection.Find.ClearFormatting
oWord.Selection.Find.Text = "honkin"
oWord.Selection.Find.Replacement.ClearFormatting
oWord.Selection.Find.Replacement.Text = ", nice"
oWord.Selection.Find.Execute Replace:=wdReplaceAll, Forward:=True, Wrap:=wdFindContinue
Next
Reply
Map
View

Click here to load this message in the networking platform