Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP5 and Word 2000
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00310617
Message ID:
00310634
Vues:
40
>Hi All,
>
>This is my first attempt at using vfp5 to create a report to a file and then load Word and open the file so it can be edited and I need some help please.
>
>Here's the code in the click event of my command button,
>store ThisForm.Sttxtcons.value to mcon
>repo form strpconsignorstatement for stncwork.cons_no = ThisForm.Sttxtcons.value ;
>to file &mcon ascii
>oword = createobject("Word.application")
>OWORD.VISIBLE = .T.
>oword.Open FileName:=&mcon ***HERE'S MY PROBLEM !!!
>ThisForm.Sttxtcons.value = " "
>ThisForm.Sttxtcons.SETFOCUS()
>thisform.refresh
>
>I'm getting stuck on the openfilename part, I keep getting error messages.
>
>I ran a macro in Word to see what was going on but can't seem to get the file open part right.
>
>Thanks for any help you can give me.
>
>Jim Harvey
>jharvey@netrax.net

myDocument = "c:\test.doc"
oword.documents.open(myDocument)

Nick
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform