Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to select records and insert in preformateed MS Word
Message
 
 
À
06/11/2001 06:46:21
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00577870
Message ID:
00577882
Vues:
15
Hi!

Open the Wrd Basic in the Word (Macros menu) and get fro there to help on all objects and properties of the MS Word application. There are a lot of this, so following is a trick to quickly figure out things you want:

- Prepare a document to the state before you need to add additional functionality.
- Use oWord.Visible = .T. to show the MS Word (if it is not already shown).
- From menu start writing the macro.
- Do the actions you want to be saved in correct order. All will be written.
- Save the macro.
- Open the Word Basci editor and see the source code of the macro. You will see the Word Basic commands that are used to reproduce all actions programmatically. It is not a problem to convert them to VFP code, but you will require to get help for most methods to get correct parameters list for call from VFP.

HTH.

>I want to extract data from table like name, designation, company and add in a preformatted word document. I am able to open word and the file but I am looking for the syntax which will insert the required data on to the specific line.
>
>oWord = CreateObject("Word.Application") && Opens MSWord Application
>oWord.Visible=.t.
>oWord.Documents.Open('DocumentName.doc') && Opens the Document
>oWord.ActiveDocument.MailMerge.OpenDataSource('datapath') && Sets the DataSource
>
>Please help and if possible send cc mail to aslam@gih-ku.com
>
>I am sure I will get enough responses and therefore I thank you in advance.
>
>Regards,
>Aslam
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform