Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 09-14-2014, 10:12 PM
Dimsok Dimsok is offline Autostart from opening documents Windows XP Autostart from opening documents Office 2007
Advanced Beginner
Autostart from opening documents
 
Join Date: Sep 2014
Location: exUSSR
Posts: 50
Dimsok is on a distinguished road
Default Autostart from opening documents


If i will rename macros to "AutoOpen" then it will be open from the start when i open doc, right? Then which trick should i do that a few macroses which i want to autorun will not have the same names?
Reply With Quote
  #2  
Old 09-14-2014, 10:36 PM
macropod's Avatar
macropod macropod is offline Autostart from opening documents Windows 7 64bit Autostart from opening documents Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
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

AutoExec and AutoExit are Auto macros that can be used in a global template, but AutoOpen and AutoClose won’t fire in a global template unless the document being opened or closed happens to be based on that global template. The macros discussed in your other thread (https://www.msofficeforums.com/word-...-position.html) are Document_Open and Document_Close macros that work in a similar way to AutoOpen and AutoClose macros, but can't be used in a normal code module - which is where you went wrong with that code.

You cannot have more than one macro with the same name in a module, regardless of what that macro does or how it is run.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Autostart from opening documents Excel Documents not opening SusiB Excel 3 10-12-2014 11:31 PM
Opening 2014 documents Barryjt Word 12 05-04-2014 04:38 AM
Autostart from opening documents Opening two documents in the same window NMRed1000 Word 1 02-16-2014 08:44 AM
Autostart from opening documents All my word documents are opening as blank. Omni1 Word 1 07-14-2011 04:23 PM
Not all documents opening wchalverson Office 0 08-24-2010 04:55 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 10:13 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft