Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 08-24-2022, 09:14 PM
BrianHoard BrianHoard is offline Deploying my VBA scripts to the enterprise Windows 10 Deploying my VBA scripts to the enterprise Office 2019
Advanced Beginner
Deploying my VBA scripts to the enterprise
 
Join Date: Jul 2022
Location: Haymarket, VA USA
Posts: 85
BrianHoard is on a distinguished road
Default Deploying my VBA scripts to the enterprise

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.
Reply With Quote
  #2  
Old 08-25-2022, 04:29 PM
Guessed's Avatar
Guessed Guessed is offline Deploying my VBA scripts to the enterprise Windows 10 Deploying my VBA scripts to the enterprise Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,176
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

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
Reply With Quote
  #3  
Old 08-25-2022, 07:14 PM
BrianHoard BrianHoard is offline Deploying my VBA scripts to the enterprise Windows 10 Deploying my VBA scripts to the enterprise Office 2019
Advanced Beginner
Deploying my VBA scripts to the enterprise
 
Join Date: Jul 2022
Location: Haymarket, VA USA
Posts: 85
BrianHoard is on a distinguished road
Default

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.
Reply With Quote
  #4  
Old 08-25-2022, 07:34 PM
Guessed's Avatar
Guessed Guessed is offline Deploying my VBA scripts to the enterprise Windows 10 Deploying my VBA scripts to the enterprise Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,176
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

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
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Deploying my VBA scripts to the enterprise Outlook 2016 VB Scripts komobu Outlook 2 08-10-2016 10:59 PM
Deploying my VBA scripts to the enterprise Deploying a customised styles toolbar in Word 2010 kennethc Word 1 03-01-2012 01:21 AM
Deploying my VBA scripts to the enterprise Deploying customised toolbars 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
Deploying my VBA scripts to the enterprise Rules & scripts bellemmar Outlook 1 09-15-2011 09:50 AM

Other Forums: Access Forums

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