Open Method fails on Error 5174

G

Guest

I am trying to open a file using a full path name stored in a variant.
Using Word 2000 in XP Home Edition.


Example code:

Dim v3 As Variant

v3="C:\ita\reports\SynCrew101JR3-D_12-Oct-2004_13.44.10\tp.1"
Documents.Open FileName:=v3

' The above code yields runtime error 5174 (cannot find file)

When I use this code:
Documents.Open
FileName:="C:\ita\reports\SynCrew101JR3-D_12-Oct-2004_13.44.10\tp.1"

the file opens up successfully.

I have tried storing the filename in a string variable. The same error
occurs.

The same behavior occurs when I use the Dir function.
I have tried to use very short fullpath names. The same failure occurs.

Appreciate any help or comments.

Thank you,

JMS
 

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