Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP and word97 error
Message
From
04/05/1998 04:16:00
Regine Rosewich
Aurum Ges.F.Untern.Ber.U.Integration Mbh
Freiamt, Germany
 
 
To
04/05/1998 01:15:37
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00095638
Message ID:
00096654
Views:
28
>>Hello I did what you saw but i yet have the same error message:
>>
>>Fuction Name is missing ).
>>
>>Thanks nowly
>>
>>Anderson Girardi
>Hi Ander,
>Following code works as intended with no error :#define wdFieldDocVariable 64
>PUBLIC oWordDocument
>*** set the LOCALEID to English
>nlLocaleId=sys(3004) && Save local id
>=sys(3006,1033) && Sending instructions in English
>oWordDocument=createobject("word.application") && Create word object
>with oWordDocument
> .Documents.Open("c:\temp\ander.doc")
> .ActiveDocument.variables("Cidade").value = "Porto Allegre"
> oRange=.ActiveDocument.Range(0,0)
> .ActiveDocument.Fields.Add(oRange, wdFieldDocVariable, "Teste1")
> .ActiveDocument.variables("Teste1").value = "Anderson Reis Girardi"
> .ActiveDocument.Fields.Update
> .visible = .t.
>endwith
>wait clear
>=sys(3006,val(nlLocaleId))I want to warn you for one thing. When using word VB commands use positional arguments not named arguments. ie: .ActiveDocument.Fields.Add(oRange, Type=wdFieldDocVariable, Text="Teste1") && Wrong
>.ActiveDocument.Fields.Add(oRange, wdFieldDocVariable, "Teste1") && TrueCetin

Hi to all OLE and WORD97 fighters,

If anyone has problems with those named arguments, there is a header file for Word97 including all named Constants necessary. Unfortuately I forgot, where on the Microsoft-Server (www.microsoft.com) it resides. But if someone darely needs the file I could mail it if necessary. (my mail adress is aurum@t-online.de

So long

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

Click here to load this message in the networking platform