Google Answers Logo
View Question
 
Q: Visual Basic Programming ( No Answer,   6 Comments )
Question  
Subject: Visual Basic Programming
Category: Computers
Asked by: skippy60-ga
List Price: $5.00
Posted: 07 Apr 2004 05:12 PDT
Expires: 07 May 2004 05:12 PDT
Question ID: 326515
Is there a way to launch a Word Document from within Visual Basic 6? I
would like to have the standard drop-down menu along the top with a
list of several Word Documents, any of which I can launch with a mouse
click.
Answer  
There is no answer at this time.

Comments  
Subject: Re: Visual Basic Programming
From: trym-ga on 07 Apr 2004 06:51 PDT
 
Hi Skippy!

There are many ways to approach this.
The best way I know of is doing the following:

1) Add a reference to the COM Object "Microsoft Word (version) Object Library"
2) In the button sub, write something like:

Dim wordApplication As Word.Application
Dim wordDocument As Word.Document
Dim theDoc As String
theDoc = "c:\mydoc.doc"
wordApplication = New Word.Application
wordDocument = wordApplication.Documents.Open(theDoc)
appWord.Visible = True ' I don't know why you need this


Hope I could help
Subject: Re: Visual Basic Programming
From: skippy60-ga on 07 Apr 2004 07:36 PDT
 
Hey, sounds good! 

But how do I access the Microsoft Word Object Library? I tried the
INSERT menu and selected OBJECT. But then what? Or is the access on
some other menu?
Subject: Re: Visual Basic Programming
From: trym-ga on 07 Apr 2004 07:49 PDT
 
"Project", "Add Reference..." in 7.0 - but if Im not mistaking, its
just "References" under "Project" in 6.0.

-Trym
Subject: Re: Visual Basic Programming
From: skippy60-ga on 07 Apr 2004 11:08 PDT
 
Trym,

Thanks. How do I pay you?

Skip
Subject: Re: Visual Basic Programming
From: trym-ga on 08 Apr 2004 12:57 PDT
 
Hi Skip!

Im glad it worked.
Unfortunately google aren't currently accepting new answer researchers.
Until they are, Im helping for free :)

-Trym
Subject: Re: Visual Basic Programming
From: skippy60-ga on 09 Apr 2004 05:50 PDT
 
Trym,

Too bad I cannot pay for the fine answer.

I will send a recommendation in to Google citing your answer.

Thanks again,

Skip

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy