Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
URGENT - Automation of Word Document.
Message
From
26/11/1998 12:59:34
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00161810
Message ID:
00161813
Views:
17
>Hi, I need help.
>
>I only need to open a Word document and search & replace one string.
>
>I'm trying, but don't work.
>
>My code is the follow:
>
>loWord = CreateObject( "word.basic" )
>loWord.FileOpen( "C:\MyDocs\Doc1.doc" )
>loWord.EditFind.Execute( "##SearchText##", .t., .t., , .t., 1, , "Replace String", 1 )
>
>At this point, I receive an error code from OLE Server.
>
>Any suggestion ???
>
>Thanks In advance!!!!!!
with loWord
 .startofdocument	&& Go to start
 .EditFindClearFormatting	&& Start a find&replace
 .editfind("Owner","Boss",0,0,0,0,0,0,,1,,1)   && Replace "Owner" with "Boss"
endwith
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform