Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Word Document Preview in VFP
Message
 
To
26/08/2004 09:27:50
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Miscellaneous
Thread ID:
00935602
Message ID:
00936586
Views:
21
To keep the text formatted you need another approach and/or another control working with DOC content. You may try RichTextControl, WebBrowser, OleBoundControl, ....

>The unformatted text makes it hard to read and it loads really slow, but it works...
>
>
>
>>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?
Previous
Reply
Map
View

Click here to load this message in the networking platform