Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 04-06-2013, 09:36 AM
etippelt etippelt is offline Adding macro to normal.dotm programmatically Windows XP Adding macro to normal.dotm programmatically Office 2007
Novice
Adding macro to normal.dotm programmatically
 
Join Date: Apr 2013
Posts: 3
etippelt is on a distinguished road
Smile Adding macro to normal.dotm programmatically

Here is my challenge:
As part of a customised application installation, I need to insert an autoexec macro into Normal.dotm. I cannot use the startup folder as this is a network shared location and the addins I need to load are licensed and cannot be generally available.
I have set up a local trusted folder in which the addins are installed, and I have enabled the use of VBA code in the trust centre. The macro I have created works fine when added manually to Normal.dotm, but I can't expect users to go through the process of adding the macro themselves, so I want to do this through code using the Word automation object. Unfortunately I am not a programmer and struggle with the coding of automation scripts. I have exported my macro as a .BAS file, so all that is left is some vbscript code (ideally) that will load the word object and poke the macro code into Normal.dotm.
Can anyone help me with the code, or point me at a web resource where I can find some code that I can adapt. Needless to say I have spent a long time Googling on various search strings to find an answer, but so far to no avail. I do understand that direct editing of Normal.dotm is not the preferred way of doing this, but in our particular circumstances, that is the only way that maintains compatibility with all the different implementations of Office 2007 at our University.
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding macro to normal.dotm programmatically New template/New normal.dotm kenglade Word 3 12-19-2011 04:00 PM
Adding macro to normal.dotm programmatically How to get to normal.dotm Aiken_Bob Word 4 05-02-2011 02:41 PM
Macro will not save to normal.dot file when exiting bobbraun Word 1 09-28-2010 06:26 AM
Adding macro to normal.dotm programmatically Word 2007 crashes due to corrupt normal.dotm stevebond001 Word 1 05-11-2010 10:49 AM
Macro for automatically adding filename without .doc RPM7 Word VBA 0 04-29-2010 01:43 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 12:32 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