Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Cant get Word97 Replace All to work
Message
 
To
28/01/1999 12:17:07
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00181347
Message ID:
00181449
Views:
11
>Which dialog ? This doesn't show up the dialog just fill and execute it.
>I think it doesn't get replaced because the selection is not in correct place.
use home()+"samples\data\customer"		&& test table
>application.datatoclip()
>wait window nowait "Creating Word Document..."
>
>oWord=createobject("word.application")	&& Create word object
>with oWord
>	.visible = .t.				&& Show word app
>	.documents.add 				&& New file, default template
>	.Selection.Paste
>	.Selection.Goto(-1,,,"\StartOfDoc")
>	#define wdDialogEditReplace 117
>	with .dialogs(wdDialogEditReplace)
>		.Find = "Owner"
>		.Replace = "Çetin"
>		.MatchCase = .f.
>		.ReplaceAll = .t.
>		.Execute
>	endwith
>*!*		with .wordbasic && Word.basic equiavalant
>*!*		.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
>endwith
>wait clear
Cetin

Cetin, this worked for you?
Did you see a dialog box come up and perform the replace?

Bret
Bret Hobbs

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

Click here to load this message in the networking platform