Click here to Skip to main content
15,906,329 members

Comments by mpower88 (Top 6 by date)

mpower88 5-Apr-11 7:37am View    
Well, i thought so too, but for some reason, it does not behave like that. It only does when i open the template manually... But my method works around that... thx for the input
mpower88 5-Apr-11 6:51am View    
I fixed it, this is my solution:
//create new document, location = path to template
Document doc = Globals.ThisAddIn.Application.Documents.Add(location);
//auto run macro
doc.RunAutoMacro(WdAutoMacros.wdAutoOpen);

Thank you for your help Slacker007 !
mpower88 5-Apr-11 6:44am View    
I've done that, now i have just 1 problem.
I call te template like this: "Globals.ThisAddIn.Application.Documents.Open(location);"
where location is the path to the template. but i realy open the template, but i need to open a new document based on the template... thx for your help btw!
mpower88 5-Apr-11 6:43am View    
Deleted
I've done that, now i have just 1 problem.
I call te template like this: "Globals.ThisAddIn.Application.Documents.Open(location);"
where location is the path to the template. but i realy open the template, but i need to open a new document based on the template... thx for your help btw!
mpower88 5-Apr-11 6:15am View    
Yes that is what i want, do you know how to do that? Do i need to save my document with macro as a .dotm? (word macro-enabled template)