Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Does Word document exist?

Status
Not open for further replies.

Palmyra

Programmer
Jan 5, 2007
150
US
Can I check for the existence of a unc path and document?

Thanks.
 
I use this in Excel. I'm not a really Word guy, but it should be close, if it doesn't work right away:

Put this somewhere:
Code:
Function FileThere(FileName As String) As Boolean
     FileThere = (Dir(FileName) > "")
End Function
Then you can call that later, like this:
Code:
If FileThere(FilePathAndName) Then
    ...


[tt]_____
[blue]-John[/blue][/tt]
[tab][red]The plural of anecdote is not data[/red]

Help us help you. Please read FAQ 181-2886 before posting.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top