Pinkrope11
New Member
- Joined
- Oct 10, 2009
- Messages
- 24
Hey everyone,
I've got a rather larger macro that runs from Excel and pulls data in from word documents. This macro works great for regular word documents that don't call templates. However, when the macro tries to open up a word document that is referencing a template, from what seems to be an auto call macro within the document, i get a run-time error:
Run-time error '5180':
Word cannoot open this document template.
(C:\...\Asdft Template.dot)
I can open the word document by hand on the computer without a problem I just can't get the macro to do it.
The link of code throwing the error within vba is:
If anyone has any suggestions I would really appreciate it!
Thanks in advance!
I've got a rather larger macro that runs from Excel and pulls data in from word documents. This macro works great for regular word documents that don't call templates. However, when the macro tries to open up a word document that is referencing a template, from what seems to be an auto call macro within the document, i get a run-time error:
Run-time error '5180':
Word cannoot open this document template.
(C:\...\Asdft Template.dot)
I can open the word document by hand on the computer without a problem I just can't get the macro to do it.
The link of code throwing the error within vba is:
Code:
Set wdDoc = wdApp.Documents.Open(Filename:=filepath)
Thanks in advance!