![]() |
#1
|
|||
|
|||
![]()
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. |
#2
|
|||
|
|||
![]()
Let me see if I understand. You want some NON-VBA script to write your macro into every users Normal. I am not sure you CAN poke the BAS file into Normal with a non-VBA solution.
You can use VBA to do it, importing the BAS file. Although you will have to open the Normal file first. I am not quite following why this is needed. Add-ins do not have to be in Startup, they can be in any folder including network folders. |
#3
|
||||
|
||||
![]()
Cross-posted at: http://social.msdn.microsoft.com/For...7-0f597bb1293b
For cross-posting etiquette, please read: http://www.excelguru.ca/content.php?184
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#4
|
|||
|
|||
![]()
If I can clarify the requirement:
1. The Word startup folder is located on a network share and applies to all Office users in the department concerned, via Group Policy 2. The word addins I need to deploy cannot be made available to all users due to licensing. 3. I have been unable to determine whether it is possible to specify a second (or third) startup folder locally. 4. The addins need to load automatically as word starts up. No other user action should be involved. 5. I have created a solution which consists of an autoexec macro which is added to Normal.dotm manually. This does the job perfectly. 6. I have the macro code exported as a BAS file. 7. I need a solution that can run via Active Setup which will add this macro code to the user's Normal.dotm (which is in their personal profile), as I cannot find any other way to achieve the automatic startup of these addins. I have successfully achieve similar results when adding add-ins to Excel, but I do understand that each Office app comes from a different stable and they do not behave in similar ways. Therefore, if you can provide me with some pointers to VBA code that I can run as a standard (non admin) user which will mount the Normal.dotm file, edit it, and then dismount and save the file, I would be very happy. If you can provide an alternative solution for automatically starting Word add-ins from a local folder then please share with me. I have been googling on this issues for many days on and off, so any help you can render would be most welcome. |
#5
|
|||
|
|||
![]() Quote:
Ed |
#6
|
||||
|
||||
![]()
Per your repsonse in the other forum:
Quote:
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#7
|
|||
|
|||
![]()
If I can clarify the requirement:
1. The Word startup folder is located on a network share and applies to all Office users in the department concerned, via Group Policy 2. The word addins I need to deploy cannot be made available to all users due to licensing. 3. I have been unable to determine whether it is possible to specify a second (or third) startup folder locally. 4. The addins need to load automatically as word starts up. No other user action should be involved. 5. I have created a solution which consists of an autoexec macro which is added to Normal.dotm manually. This does the job perfectly. 1. There is still a Startup locally 2. There seems to be a bit of a conflict here. If these are NOT available to some users, how does this balance to #4 - that they are loaded automatically. Does your autoexec test the username somehow 3 see #1...there is still a local Startup 4. Some addins, all of them...what 5. perhaps post what is in that autoexec. |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
kenglade | Word | 3 | 12-19-2011 04:00 PM |
![]() |
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 |
![]() |
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 |