Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Word Automation
Message
De
21/03/2000 12:48:07
 
 
À
21/03/2000 12:07:20
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Titre:
Divers
Thread ID:
00348448
Message ID:
00348478
Vues:
22
Try using....

oWord.Selection.ParagraphFormat.Alignment = 3

Anytime a constant is called for, you have to substitute the actual value when calling Word from VFP. You can get those values by going to Tools->Macros->Visual Basic Editor in Word and then pressing F2 for the Object Browser. Enter the constant in the search textfield and you'll see the equivalent value.

>I am trying to create a word OLE automation to copy the content of a memofield to a word document, then justify the text and save it in word. I am able to do everything but justify the text. This if the following code I am using, but it bombs on the justify command.
>
>oWord=CREATEOBJECT("Word.Application")
>oWord.WindowState=2
>oWord.Visible = .F.
>cSce="table.memo" ***memo field***
>cmemo=EVAL(cSce)
>_CLIPTEXT=""
>_CLIPTEXT=cmemo oWord.Documents.Add.Content.Paste
>oword.Selection.WholeStory
>oword.Selection.ParagraphFormat.Alignment.wdAlignParagraphJustify
>
>I've tried to record the macro, but I can't convert this code correctly.
>
>Any Ideas..
>
>TIA
>
>Rob
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform