Opening a document in Word from VB 5.0 
Author Message
 Opening a document in Word from VB 5.0

I have form letters composed in Microsoft Word which are merged with an
Access database that I update from VB 5.0.  I am using the CreateQueryDef in
VB to create the query which is read by Word.  Everything is merged into
Word OK.  My problem is that I do not know how to call Word and open my
document (form letter) from my VB 5.0 form.

I would appreciate any help!  Please email a response to


Thanks,

Sharon Staviski
RS Data Systems



Tue, 22 May 2001 03:00:00 GMT  
 Opening a document in Word from VB 5.0
Hi Sharon,

Quote:
> My problem is that I do not know how to call Word and open my
> document (form letter) from my VB 5.0 form.

    Dim wdobj As Word.Application
    Dim wdDoc As Word.Document
    Set wdobj = CreateObject("Word.Application")
    Set wdDoc = wdobj.Documents.Open(strFileName)
    'wdobj.Visible = True
''Do other things
    'wdobj.Quit
    Set wdobj = Nothing
    Set wdDoc = Nothing

Cindy Meister
INTER-Solutions, Switzerland
http://ourworld.compuserve.com/homepages/cindymeister

This reply is posted in the Newsgroup; please post any follow question
or reply in the newsgroup and not by e-mail :-)



Wed, 23 May 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Trouble Opening a Word Document with VB.NET,Open member not found in Documents

2. Using Word-documents as Reports in VB 5.0?

3. VB error on opening word documents

4. Word Automation Failure when other word documents are open

5. Opening Existing Word Document using VB (GetObject)

6. opening and closing word document using vb,net

7. Opening and Saving MS Word Documents using VB.NET

8. How open a Word document since VB

9. Opening / Closing word documents from VB

10. how to use vb to call word/excel to open a document

11. Help, Opening a word document from VB

12. How open a Word document since VB

 

 
Powered by phpBB® Forum Software