Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 12-07-2016, 05:44 AM
macropod's Avatar
macropod macropod is offline Transfer of embedded macros after template is opened, Windows 7 64bit Transfer of embedded macros after template is opened, Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,370
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

If it's a true template, it would have a dotm extension, not docm. That said, what you're describing is the normal behaviour for a document created from a template. If you want the macros to travel with the document, you'll have to add them to the document - and save it in the docm format. Although this could be done programmatically, it would require giving 'trusted access' to the VBA project environment, which is a significant security risk for you. Otherwise, you could send both the document and the template - which the recipient would need to copy to their own templates folder (not a simple task for most users) so the macros would once again be available to the document.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #2  
Old 12-07-2016, 09:48 AM
BJH BJH is offline Transfer of embedded macros after template is opened, Windows 7 64bit Transfer of embedded macros after template is opened, Office 2010 64bit
Novice
Transfer of embedded macros after template is opened,
 
Join Date: Dec 2016
Location: Swansea, UK
Posts: 4
BJH is on a distinguished road
Default

Quote:
Originally Posted by macropod View Post
If it's a true template, it would have a dotm extension, not docm.
Thanks for replying to my question. Yes you're right, it's a .dotm file, I made a mistake in my post.

Quote:
Originally Posted by macropod View Post
If you want the macros to travel with the document, you'll have to add them to the document - and save it in the docm format.
Ah ok. That's a shame, as I lose the advantages of the template.

Quote:
Originally Posted by macropod View Post
Although this could be done programmatically, it would require giving 'trusted access' to the VBA project environment, which is a significant security risk for you.
I'm not sure I've understood this part of your reply. The functionality I was hoping for is that the template, which contains the helper macros, would transfer these macros to the new document when it is opened. Whether those macros actually run or not would still be dependent upon the macro security settings of the user installation, of course.


Quote:
Originally Posted by macropod View Post
Otherwise, you could send both the document and the template - which the recipient would need to copy to their own templates folder (not a simple task for most users) so the macros would once again be available to the document.
Ok thanks. I understand from your reply that the functionality I was hoping for does not exist, and in order to replicate the behaviour I have on my installation I'd have to give instructions for users to copy the .dotm to their templates folder.
Otherwise, I'd have to distribute a .docm, and then the macros would be available, but in that instance it is likely that someone will eventually overwrite the document (which is why a template is useful in the first place).

I guess another option is to use a .docm file and version control it. But getting the users to understand version control... hmmm.

Many thanks again for your response.
Reply With Quote
Reply

Tags
macro transfer



Similar Threads
Thread Thread Starter Forum Replies Last Post
Transfer of embedded macros after template is opened, Newsletter created with template on Mac has many mistakes when opened on PC neco23 Word 1 08-27-2015 09:53 PM
Transfer of embedded macros after template is opened, When creating new template from established template macros getting lost. TechEd Word 3 06-09-2014 07:22 PM
Transfer of embedded macros after template is opened, Word Template is not recognised when opened by double click. Creates new document. stevewak Word 8 03-19-2014 05:12 AM
Creating document from template but macros are still linked to template webharvest Word 0 07-16-2011 09:34 AM
Transfer of embedded macros after template is opened, Macros not working when template is emailed EMH Excel Programming 1 07-06-2011 09:24 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 10:04 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft