Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Driving Word
Message
 
 
À
11/04/2008 05:52:22
Information générale
Forum:
Visual FoxPro
Catégorie:
Produits tierce partie
Titre:
Divers
Thread ID:
01309899
Message ID:
01309909
Vues:
12
If your question isn't answered here (which it probably will be), here is a good article about automating Word from VFP --

http://www.inquiry.com/techtips/vfox_pro/10min/10min0600.asp


>Hello Everyone,
>
>An age old question (probably). I need to drive Word to manage some documents. I've records a macro in Word to open a document, select all the text and copy it, create a new document and paste the text in:
>
>Sub Macro1()
>'
>' Macro1 Macro
>' Macro recorded 4/11/2008 by Development
>'
> ChangeFileOpenDirectory "C:\Empower\System\Personnel P\EMPOWER\"
>
> Documents.Open FileName:="""Applicant - Offer.doc""", ConfirmConversions:= _
> False, ReadOnly:=False, AddToRecentFiles:=False, PasswordDocument:="", _
> PasswordTemplate:="", Revert:=False, WritePasswordDocument:="", _
> WritePasswordTemplate:="", Format:=wdOpenFormatAuto, XMLTransform:=""
>
> Selection.WholeStory
> Selection.Copy
> Documents.Add DocumentType:=wdNewBlankDocument
> Selection.PasteAndFormat (wdPasteDefault)
>
>End Sub
>
>
>How would I do this in VFP after I create a Word.Application object? Any help or pointers to resources is appreciated.
>
>Cheers,
>
>Andy
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform