dev-ngps7
asked on
Accessing a current Word Document
Here is a tough and confusing problem i have, please consider the following code
actDoc = WordApp.Documents.Open(arr StringPath (intFileCo unt))
actDoc is of type Word.Document
WordApp is of type Word.Application
arrStringPath has the pathname of the word document
When debugging, this message appears as the line of code above is processed
* no user rights (i have sufficient rights)
*document name of path invalid (all path names are stored in the array)
I have used a watch to confirm pathnames are being input into the array
actDoc = WordApp.Documents.Open(arr
actDoc is of type Word.Document
WordApp is of type Word.Application
arrStringPath has the pathname of the word document
When debugging, this message appears as the line of code above is processed
* no user rights (i have sufficient rights)
*document name of path invalid (all path names are stored in the array)
I have used a watch to confirm pathnames are being input into the array
If that doesn't wrok, maybe this link will help:
http://support.microsoft.com/default.aspx?kbid=286892
http://support.microsoft.com/default.aspx?kbid=286892
Try:
actDoc = WordApp.Documents.Open(arr StringPath (intFileCo unt).ToStr ing)
actDoc = WordApp.Documents.Open(arr
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Try hardcoding the file name:
actDoc = WordApp.Documents.Open("c: \test1.doc ")
actDoc = WordApp.Documents.Open("c:
ASKER
I wish to close this thread due to the fact that i accidently opened up more threads with the same sort of question. For this, i can only apologise as i am new to Experts Exchange. This problem can be further discussed here:
https://www.experts-exchange.com/questions/21166350/Ways-of-accessing-existing-Word-documents.html
Sorry for the inconvenience caused.
https://www.experts-exchange.com/questions/21166350/Ways-of-accessing-existing-Word-documents.html
Sorry for the inconvenience caused.
Why don't you just keep the argument as arrStringPath?