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:
00310805
Vues:
20
>>myDocument = "c:\test.doc"
>>oword.documents.open(myDocument)
>>
>>Nick
>
>Hi Nick,
>
>Thanks, I'm getting closer.
>
>Here's my code now,
>
>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.
>myDocument = "C:\SALES\GARDEN\JAN\2000\&MCON" + ".TXT"
>oword.documents.open(mydocument)
>OWORD.selection.TopMargin = 0.5
>OWORD.selection.BottomMargin = 0.5
>OWORD.Selection.WholeStory
>OWORD.selection.Font.Name = "Courier New"
>OWORD.selection.Font.Size = 10
>ThisForm.Sttxtcons.value = " "
>ThisForm.Sttxtcons.SETFOCUS()
>thisform.refresh
>
>
>It's okay until I get to the setting the margins part and, I've tried every variation I could think of. What am I doing wrong?
>
>Thanks,
>
>Jim Harvey
>jahrvey@netrax.net

TopMargin property does not apply to the Selection object. It is a property of PageSetup object.

OWORD.ActiveDocument.PageSetup.TopMargin = 0.5 will work.
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
Répondre
Fil
Voir

Click here to load this message in the networking platform