|
-
Feb 23rd, 2001, 10:20 AM
#1
Thread Starter
New Member
I have a little problem opening a word document on a LAN drive. The code I am using works fine if I am using one of my local drives but gives me this error when I switch to the LAN ("ActiveX component can't create object")
Here is the code:
'Documents.Open (SearchDirectory & "\" & File)'
Searchdirectory is the path and file
is the filename to be opened.
Does anyone have any idea why this wont work on a lan? or what to do to fix it?
By the way....I am using NT
Any help would be greatly appreciated..
Thanks
-
Feb 23rd, 2001, 10:28 AM
#2
Addicted Member
I am doing this in Windows 2000:
FileName = "h:\IrpInvoices\" & vInvFileName 'Production
Set objectWord = New Word.Application
objectWord.Documents.Open (FileName), , , , , , , , , Format:=wdOpenFormatText
This is working and in production. I guess you made sure your search directory is returning the correct path.
-
Feb 23rd, 2001, 10:37 AM
#3
Thread Starter
New Member
Thanks..
Thank you very much!!!
I had already tried declaring it as an object but I didnt use the 'Format:=wdOpenFormatText'.
It seems that was they key...
Thanks again
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|