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

Re: opening word document from Visual Basic 6 by Doug

Doug
Mon Oct 13 23:07:27 CDT 2003

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
"William Miller" <william.miller21@comcast.net> wrote in message
news:114c01c3918d$9c7b5310$a301280a@phx.gbl...
> 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