Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Word Document Preview in VFP
Message
 
À
23/08/2004 14:26:45
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Divers
Thread ID:
00935602
Message ID:
00935675
Vues:
37
This message has been marked as a message which has helped to the initial question of the thread.
You could extract the text from the document, and insert it into the control of your choice:
oWord = CREATEOBJECT("Word.Application")
oWord.documents.open(yourdocument)
oWord.ActiveDocument.Content.Copy
lcTEXT=_cliptext
oWord.quit
oWord=.null.
release oWord
* do what you wish with lcTEXT

>I was actually looking for something where I could put the contents of the word document in an object like an input box or something like that. I didn't want to do a seperate window type thing like a print preview would do.
>
>
>>You could use word automation :
>>- set appropriate Word Menu options to disabled, like:
>> oword.CommandBars("Menu Bar").Enabled = .f.
>>- open the document in preview mode:
>> oWord.ActiveDocument.printpreview()
>>- wait while "preview"$LOWER(oWOrd.ActiveWindow.Caption)
>>......
>>- set Menu options back
>>oword.CommandBars("Menu Bar").Enabled = .t.
>>
>>
>>>I have done some office automation with VFP. All is well with it. I worked some mail merge fields from tables into word documents.
>>>
>>>Now I am looking at simply displaying the document's template on the screen so they can see a sample of the text within the letter when they choose what type of form letter they would like to select. Is there an active X control or anything else which would display this as a read only object on the screen?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform