Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Word97 and VFP Error
Message
From
29/04/1998 13:45:41
Regine Rosewich
Aurum Ges.F.Untern.Ber.U.Integration Mbh
Freiamt, Germany
 
 
To
29/04/1998 08:46:59
Anderson Girardi
Athenas Automação de Escritório
Porto Alegre, Brazil
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00095641
Message ID:
00095723
Views:
18
> Hello All
>
> I'm trying to automatizate the MS-Word97 with VFP 5.0
>
> I have a word document and into this document i have a field
> {DocVariable "Cidade" \*MergeFormat }, this document is called teste.doc.
>
> In VFP i have the follow sintax:
>
>PUBLIC ObjWDdoc
>
>*** set the LOCALEID to English
>nlLocaleId=sys(3004)
>=sys(3006,1033)
>
>
>Wait wind WAITMESSAGE6_LOC nowait
>objWDdoc=crea("word.basic")
>objwddoc.APPSHOW
>objwddoc.FileOpen("C:\athenas\ath_lici\teste.doc",.t.)
>
>Here i have problem
> objwddoc.Insert(cidade, "Porto Alegre")
>The VFP shows me a message saying variable Cidade is not found.
>Anyone can help me?
>Thanks

If It's really Word97 you try to automize, some things are necessary to do before.
First you have to apply the Office97-ServicePack 2 on your Word Installation. Otherwise the communication with VFP 5.0 wont't work properly. Second you have to change the syntax of your commands

objWDdoc = CREATEOBJECT("word.application")
WITH objWDdoc
.Application.visible = .T.
.Documents.Open("......)
.ActiveDocument.FormFields("cidade").Result = "Porto Alegre"


and so on

Good Luck (the integration of MS-Office always is a lovely stuff)

Regine
********************************
VFP, VB, VC++ Programmers
Makers of the ==>TheMiL<== engine
for intra- and internet data processing
********************************
Previous
Reply
Map
View

Click here to load this message in the networking platform