Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Link between vfp and word97
Message
From
03/02/2001 15:04:32
 
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00472232
Message ID:
00472244
Views:
39
Michel,

I don't have a way to test this for you, but perhaps you can do this instead of your last DoCmd line:
numero = oFox.Eval(lastfact)
If that returns the wrong type, you might have to Dim another variable to receive the value, then convert it to integer.

Just some ideas to play with...

>I have a vfp table (lastreco) with only one field (lastfact as numeric) and only one record (#1) ; the value of this record is 123. I need to pick up the content of this record to insert his value in a Word97 document.
>
>I wrote this program in vba:
>
>Sub numero_facture()
>Dim numero as integer
>Dim oFox As Object
>Set oFox = CreateObject("VisualFoxPro.Application")
>oFox.DoCmd "USE lastreco.dbf"
>oFox.DoCmd "go 1"
>oFox.DoCmd "store lastfact to numero"
>numero = numero + 1
>Selection.TypeText Text:=numero
>End Sub
>
>The result of the execution is 1 and not (123+1)=124.
>
>Who can help me.
>
>Thanks.
David Stevenson, MCSD, 2-time VFP MVP / St. Petersburg, FL USA / david@topstrategies.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform