![]() |
#1
|
|||
|
|||
![]()
After creating several Word VBA scripts and a custom ribbon, a team of editors are eager to start using them. Before I create an installer, I would like to get any expert advice from those who have done this before. Here is my current plan, but I'm sure it could be improved.
- I created a Ribbon.dotm file that contains my ribbon, custom icons and buttons, that calls VBA scripts from a second Scripts.dotm file. - My thought here is I can easily update the Scripts.dotm file without having to update the ribbon. So far, this is working well. - I have the few editors who beta test these scripts manually copy these 2 files from my network share to their local folders at %appdata%\Microsoft\Word\STARTUP. - Now that we're ready to add many more people to the list of users, I'm thinking instead of instructing people how to copy these files, I'll make a Windows .bat file that does that. And instruct them to copy this shortcut to their desktops. - Then, when they click on this shortcut, it will execute my .bat file on the network, where I can change, modify, and keep it updated to do whatever I want them to do. Like check if they have the latest version of the files, create the STARTUP folder if needed the first time, allow them to select from previous versions of the scripts, etc. I would love to be able to provide a file they could download from the intranet website, but I'm pretty sure the firewalls will not allow any .bat file to be executed. Maybe there is a way to achieve that? Does this sound like a solid plan? Thanks for any advice. |
#2
|
||||
|
||||
![]()
I would keep the custom ribbon and the vba scripts in the same template. Keeping them separated doesn't offer any benefits but does give you another point of failure.
The execution of the update script (in whatever form you use) should happen at startup to give you the best chance of Word being closed (the copy will fail if Word is open when writing updates to the Word Startup folder). I used a vbs script when I manually did this but our IT group replicated that functionality via their group policies and scripts. Security profiles will block scripts AND dotm files from working when sourced from an intranet so your system will need to work from a shared network drive rather than an intranet. Are you also distributing document templates? If your startup templates include styles then they don't become available to the users documents via that path.
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
#3
|
|||
|
|||
![]()
Thanks for this info, Guessed. I was thinking I would need a way to tell if Word was running, and to give the user a notice to close Word before continuing.
But not sure yet how to do that. As far as distributing document templates, no I'm not doing that. I'm just creating some VBA scripts. The reason I was using 2 .dotm files is to avoid having to uncompress the .dotm, make the changes, and recompress, rename, etc since it contains the custom ribbon. But as you said, it's more files to maintain. Maybe I can just edit the scripts directly in that .dotm file and not have to unzip it, edit XML, and recompress. For some reason I thought I needed to. |
#4
|
||||
|
||||
![]()
You don't have to unzip/rezip to edit the customUI.xml. If you install 7Zip you can simply right click on the dotm file and choose to Open the Archive and then double click the file to open it in your default text editor. When you close that you are prompted to decide to update the zip file or not. You can also choose to use a CustomUI Editor which also avoids having to fiddle around with the zip format.
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
komobu | Outlook | 2 | 08-10-2016 10:59 PM |
![]() |
kennethc | Word | 1 | 03-01-2012 01:21 AM |
![]() |
kennethc | Word | 1 | 02-11-2012 01:18 PM |
New to Powerpoint, can I add scripts? | Drachsi | PowerPoint | 0 | 12-22-2011 07:31 AM |
![]() |
bellemmar | Outlook | 1 | 09-15-2011 09:50 AM |