PDA

View Full Version : Reading paragraphs from a Word Doc to display in a user form



peggyj2007
04-17-2008, 01:59 PM
Hope you can help.

I have a routine that uses over 250 separate paragraphs in Word docs (in English and the same in French) to create letters. I have a user form that the user selects the paragraph document by its filename from a generated listing in it's directory.

I would like them to be able to view the file on a single click. I can achieve this by opening the file in the background, copying the txt to a variable then populating the box with the text. It works but is causing 'screen' flickering in the background on the open and close.

Is there any way to 'Read' a Word Doc like you do with a TXT file, hold it as the variable to display it? Also, any hints on the screen updating?

Thanks in advance

RBarrett
04-18-2008, 06:30 AM
Are you opening the document with Visible = False?

lucas
04-18-2008, 08:52 AM
Hi Peggy,
could you possibly post an example so we don't have to try to recreate everything you have and still not have the same thing you have before trying to solve this please.

Go to the lower left of the last post and hit post reply....then scroll down and look for a button that says "manage attachments"

Your post count is low and I think you may need 5 to be able to post your document so just post a couple of posts with a few dots or something...I will delete them later.

be sure to remove any proprietary info from the document before posting it.

peggyj2007
04-18-2008, 11:03 AM
Thanks all but some how got it all worked out this morning. I had to mcgiver it a bit but is running clean fast and most of the refresh/updating issue is gone. I still have some at the startup of the routine and the form load and will continue working on that.

I did end up opening it invisible and was able to extract the paragraph text as a variable to load into a view box on the user form. So, now when the user single clicks on the file/paragraph name it is instant and no refresh.'

Thanks for the replies.

Peggy