|
-
Jul 25th, 2002, 02:15 PM
#1
Thread Starter
Lively Member
Opening a Word Document in VB
Hello everybody.
I have a very strange problem.
I'm trying to open a Word Document in VB.
This is the code I'm using:
-----------------
Dim WrdApp as Word.Application
dim WrdDoc as Word.Document
Set WrdApp=new Word.Application
Set WrdDoc=WrdApp.Documents.Open(FileName:=thefilenameiwanttoopen)
-------------------
I tried this code on a PC, and it worked just fine.
I tried it on another PC, but it's not working.It seems that Word is catching the File somewhere because if I try then to open it from outside VB, I get a message:
"This File is Locked For Editing...." 
Please Help Me.
Thank you
-
Jul 25th, 2002, 02:27 PM
#2
what is the error you get in VB on the seconds PC when you try to run the code?
-
Jul 25th, 2002, 02:33 PM
#3
I've had the same problem and discovered that if I closed the Word session via Task Manager, I was able to open the document.
-
Jul 25th, 2002, 02:43 PM
#4
Thread Starter
Lively Member
Kleinam, the most tricky part is that I ain't getting any error message.
Hack, in Task Manager doesn't appear any Word Session.
When running the Program, I don't see that word is being opened (if it is being opened)
Maybe my syntax is wrong?
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
|