Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 05-26-2018, 02:02 AM
THH4929 THH4929 is offline Run macros when document opens Windows 10 Run macros when document opens Office 2016
Novice
Run macros when document opens
 
Join Date: May 2018
Posts: 3
THH4929 is on a distinguished road
Default Run macros when document opens

Hi all,




is there a way to enable macros to run on a work doc, i.e., to update all bookmarks, without having click the enable button?


The reason behind my question is that i'm creating new documents that I want to be able to send to all staff/clients, that requests user input via input boxes to update bookmarks in the document, for example, client form, that requests users to input critial information requirements.


If not, no worries, just looking for a more professional look from a clietns perspective.


Many thanks
Reply With Quote
  #2  
Old 05-26-2018, 02:51 AM
macropod's Avatar
macropod macropod is offline Run macros when document opens Windows 7 64bit Run macros when document opens Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Yes - add the macros to the document's template and drive them via a Document_Open macro in the template's 'ThisDocument' code module or via an AutoOpen macro in a normal code module.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 05-27-2018, 01:26 AM
Guessed's Avatar
Guessed Guessed is offline Run macros when document opens Windows 10 Run macros when document opens 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

Macros can be enabled automatically in several ways. The two easiest ways are:
- You can trust a folder containing the file where your macros are. Check File > Options > Trust Center > Trust Center Settings > Trusted Locations
- If you don't have rights to change this (because your IT guys don't trust you) then an alternative is to put the template into your User Templates folder location which is automatically trusted. By default, this folder is located in %appdata%\Microsoft\Templates

If you are sending files to external clients, then having them do something like this is very unlikely so you need to examine whether there is a non-macro alternative to what you are trying to achieve and whether its worth asking them to install templates to these trusted locations. I would be exploring whether a form with linked Content Controls might work better as a way of getting user inputs.
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Word 2007 - Document opens remote template Lectrician Word 9 12-10-2013 07:19 AM
Document properties opens everytime I open a powerpoint nyrangers1994 PowerPoint 0 01-08-2013 07:10 AM
Run macros when document opens Link to docx document opens in NotePad Marcebrown PowerPoint 1 07-28-2012 10:22 AM
Run macros when document opens word opens exisiting document oneway1963 Word 2 12-29-2011 08:22 PM
Run macros when document opens Can you and how, cause a http redirection when a user opens a word document avaintcon Word 1 09-02-2009 05:02 PM

Other Forums: Access Forums

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