Forum Discussion
gjameric2090
May 03, 2024Copper Contributor
How to share a dotm file with VBA with design mode off
Hello all, I have created a tool using word and VBA where a user selects the name of a company and it creates a letterhead based on data in an excel sheet. Briefly, there are three files in...
- May 03, 2024
gjameric2090 Files 1 and 3 should be combined into a single Macro Enabled Template with code in an AutoNew macro (or Document New Event) that displays a UserForm that contains a dropdown control that is populated with the data from the Excel Resource and any other controls that might be necessary for the process.
The Macro Enabled Template should be stored in the user's Template folder and they would use FIle>New and select that template when they need to create a new "letter head" document.
The Excel file will need to be stored in a location that is available to all users, or if you are going to located that on each users machine, you may need a routine for the users to browse to and select that file the first time they use the system and that have the full path of the file stored in the registry from where it would be obtained on subsequent uses.
See the following pages of Greg Maxey's website :
http://gregmaxey.mvps.org/Create_and_employ_a_UserForm.htm
http://gregmaxey.mvps.org/Populate_UserForm_ListBox.htm
May 03, 2024
gjameric2090 Files 1 and 3 should be combined into a single Macro Enabled Template with code in an AutoNew macro (or Document New Event) that displays a UserForm that contains a dropdown control that is populated with the data from the Excel Resource and any other controls that might be necessary for the process.
The Macro Enabled Template should be stored in the user's Template folder and they would use FIle>New and select that template when they need to create a new "letter head" document.
The Excel file will need to be stored in a location that is available to all users, or if you are going to located that on each users machine, you may need a routine for the users to browse to and select that file the first time they use the system and that have the full path of the file stored in the registry from where it would be obtained on subsequent uses.
See the following pages of Greg Maxey's website :
http://gregmaxey.mvps.org/Create_and_employ_a_UserForm.htm
http://gregmaxey.mvps.org/Populate_UserForm_ListBox.htm
- gjameric2090May 09, 2024Copper Contributor
Thanks for this, Doug_Robbins_Word_MVP
I've been a bit behind with work so will give this a try and get back to you.
Thanks!
- gjameric2090May 15, 2024Copper ContributorThis worked like a charm, thanks for your help with this.