Hi,

I am new to programming with vba and I have a problem when opening a word document from powerpoint, due to something to do with the word template file.


From powerpoint i am opening a word file using the commands:

Dim objWrd As Word.Application 'Object
Set objWrd = CreateObject("Word.application")
objWrd.Documents.Open (flname)

Where 'flname' is the file i want to open.

This works fine on my machine, but when i tried opening the same word file from powerpoint on another machine, i got an error saying it cannot find the template .dot file. This seems fair enough because the template file it's looking for is not stored on that machine, BUT, the file will open on that machine if i just double click on it in an explorer window with no errors! Why??

Is there a way i can suppress this template error? I?m trying to avoid having to put the document template file on every machine i want to run this macro on.

Any help would be much appreciated, thanks.

Lee.