Hi there,
I am creating a macro enabled template in Word 2010 for someone. I have some really basic macros e.g. inserting an autotext (as the end user is more familiar with macros than autotexts). When I look at the code, it references where the template is saved i.e. my C drive. If I email this template it still points to this location, and therefore won't run (run time error 5941 - the requested member of the collection does not exist). Do I just take out everything except the template name or do I need to add something else? Is there a way to update macros to reflect being saved to a different location - it seems crazy that they're not just simply attached to a file no matter where it is?
Thanks in advance!
I am creating a macro enabled template in Word 2010 for someone. I have some really basic macros e.g. inserting an autotext (as the end user is more familiar with macros than autotexts). When I look at the code, it references where the template is saved i.e. my C drive. If I email this template it still points to this location, and therefore won't run (run time error 5941 - the requested member of the collection does not exist). Do I just take out everything except the template name or do I need to add something else? Is there a way to update macros to reflect being saved to a different location - it seems crazy that they're not just simply attached to a file no matter where it is?
Thanks in advance!
Code:
Application.Templates( _
"C:\Documents and Settings\Final\Note_Template Final.dotm" _
).BuildingBlockEntries("Chart Narrow").Insert Where:=Selection.Range, _
RichText:=True