opening word document from Visual Basic 6

W

William Miller

I am getting error when opening Word from VB 6. The line
is: objWord.Documents.Open App.Path + "\Forms\Admin 1.doc"
The strange situation is that this same code has worked on
many different computer, but is not working on my new
laptop (Toshiba Windows XP, Word XP, VB 6(sp5)). When I
manually step through the code, no error.
Any help would be appreciated
 
D

Doug Robbins - Word MVP

Hi William

Try:

objWord.Documents.Open Application.Path & "\Forms\Admin 1.doc"

I would be very surprised if

objWord.Documents.Open App.Path + "\Forms\Admin 1.doc"

ever worked for you.

Also, I would not be storing documents in that location.

Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.

Hope this helps
Doug Robbins - Word MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top