Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP5 word automation
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Titre:
VFP5 word automation
Divers
Thread ID:
00317221
Message ID:
00317221
Vues:
66
Hi All,

I'd like to reset the top and bottom margin of the new .doc to 0.5.

This code does not crash but, it also does not change the margins. I've tried moving the code but this doesn't help.

When the .doc loads in "Word", the text is still "selected", do you think this has something to do wioth the margins not be reset?

Any help woould be appreciated, as always.

Thanks,

Jim Harvey
jharvey@netrax.net


***Here's the code
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.
mcurdir = curdir()
myDocument = mcurdir + "\" + "&MCON" + ".DOC"
oword.documents.open(mydocument)
OWORD.activedocument.pagesetup.TopMargin = 0.5
OWORD.activedocument.pagesetup.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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform