Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP and word97 error
Message
From
02/05/1998 14:31:20
 
 
To
02/05/1998 14:15:37
Anderson Girardi
Athenas Automação de Escritório
Porto Alegre, Brazil
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00095638
Message ID:
00096527
Views:
26
>Hello Alexander Grigorjev,
>
>Nowly i did what you saw but i'm yet have problem now the VFP shows me a message saying "Missing operand"
>
>Do you know are can be?
>
>Thank you very much
...snip
>
>Anderson Girardi
>

Hello Anderson Girardi,

try the following code:

PUBLIC oWordDocument RegistroEdital
#define wdFieldDocVariable = 64 && as defined in MS Word VB
...
oWordDocument=createobject("word.application") && Create word object
with oWordDocument
.Documents.Open("c:\athenas\ath_lici\teste.doc")
.ActiveDocument.variables("Cidade").value = "Porto Alegre"
oRange=.ActiveDocument.Range(0,0)
.ActiveDocument.Fields.Add(oRange, wdFieldDocVariable, "Teste1")
.ActiveDocument.variables("Teste1").value = "Anderson Reis Girardi"

*-- no need for FOR loop
*-- For ix= 1 to .ActiveDocument.Fields.count
*-- .ActiveDocument.Fields(ix).Update
*-- Next
*-- no need for FOR loop
.ActiveDocument.Fields.Update
.visible = .t. && Show word app - Word 7.0 support
endwith
...

Good Luck

Alexander
Alex
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform