Opening MSWord File from a remote directory?

mOrrI_sEm_sAbEr
12-16-2004, 04:24 AM
Hello there,
i was wondering if anyone knows if there is any special code to open a word document in a remote directory????

i'm using this code to open the file....


File_Path = "\\RemoteFolder\WordDocs\"
File_Name = "Something.doc"
word_server = New Word.Application()
word_server.ChangeFileOpenDirectory(File_Path)
word_server.Documents.Open(File_Name)
word_server.Visible = False

:huh:

Mike Rosenblum
12-16-2004, 07:50 AM
I'm not a "Word guy" but that code looks fine. I guess you could try:word_server.Documents.Open(File_Path & File_Name) Is it just ignoring the command (failing to Open) or are you getting a specific error message? If so, on which line and what message?

mOrrI_sEm_sAbEr
12-16-2004, 08:16 AM
ok i forgot to mention something....
i'm runing this code on a webservice....
i can open the MSword appplication but then he throws and exception saying the path isn't good...

i also runed the code in a windows application with the same values and the application opens MSWord, opens the doc file, writes the pic on the doc file, prints and saves the file....

so i think it's a permission thing... that in the webservice when i open the MSword aplication i don't have permission to open the files in the remote directory...

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum