We’d like to remind Forumites to please avoid political debate on the Forum.
This is to keep it a safe and useful space for MoneySaving discussions. Threads that are – or become – political in nature may be removed in line with the Forum’s rules. Thank you for your understanding.
📨 Have you signed up to the Forum's new Email Digest yet? Get a selection of trending threads sent straight to your inbox daily, weekly or monthly!
The Forum now has a brand new text editor, adding a bunch of handy features to use when creating posts. Read more in our how-to guide
Word VBA/Macro, run whilst document protected
dori2o
Posts: 8,150 Forumite
in Techie Stuff
I've designed a template to autofill a newsletter in a specific formatting sequence. However, for reasons I can't understand, the place where the template will be used will not allow me to save the document as a .dotm document. To get around this I have created a macro within the userforms command button code that will create the final newsletter on a new word document and not on the template itself.
I have to set protection to the document (a macro enabled document)
As this is in word I'm having issues with this as the very first thing a person will do when using the template is open a user form.
This is where I'm struggling.
The template will be saved in a central folder on a network with access to many people, setting individual editing restrictions for each person is not an option.
What can I do to make it possible to allow someone who accesses the template to open the userform despite the document being protected.
If it was an excel document I'd simply insert a form button (opposed to a command button) and used a macro that opened the userform. Obviously I don't have that option with word.
I know I can set a button on the ribbon, but I always thought that this was saved on a single workstation only and not on any workstation that the document is opened from, meaning everyone would have to set up the button, again this is not an option.
Any help would be appreciated.
I have to set protection to the document (a macro enabled document)
As this is in word I'm having issues with this as the very first thing a person will do when using the template is open a user form.
This is where I'm struggling.
The template will be saved in a central folder on a network with access to many people, setting individual editing restrictions for each person is not an option.
What can I do to make it possible to allow someone who accesses the template to open the userform despite the document being protected.
If it was an excel document I'd simply insert a form button (opposed to a command button) and used a macro that opened the userform. Obviously I don't have that option with word.
I know I can set a button on the ribbon, but I always thought that this was saved on a single workstation only and not on any workstation that the document is opened from, meaning everyone would have to set up the button, again this is not an option.
Any help would be appreciated.
[SIZE=-1]To equate judgement and wisdom with occupation is at best . . . insulting.
[/SIZE]
[/SIZE]
0
Comments
-
Is it possible to use an excel file to 'launch' whatever you want to do?
can you not then embed the excel file within the word doc. The excel file would be one button which fires the macro.
Or if the quick access button does not run with the file can you insert an 'on open' macro which adds the quick access button to the users copy of word?0 -
Thanks for the advice.
I've actually managed to solve this now by adding a section break before and after the command button then restricting the document to form filling only and unrestricting section 2 where the button sits whilst restricting the other sections.
Thanks[SIZE=-1]To equate judgement and wisdom with occupation is at best . . . insulting.
[/SIZE]0
This discussion has been closed.
Confirm your email address to Create Threads and Reply
Categories
- All Categories
- 353.6K Banking & Borrowing
- 254.2K Reduce Debt & Boost Income
- 455.1K Spending & Discounts
- 246.6K Work, Benefits & Business
- 603K Mortgages, Homes & Bills
- 178.1K Life & Family
- 260.7K Travel & Transport
- 1.5M Hobbies & Leisure
- 16K Discuss & Feedback
- 37.7K Read-Only Boards