Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 10-16-2014, 10:14 AM
bjofo bjofo is offline Help with a macro which run when opening a doc Windows 8 Help with a macro which run when opening a doc Office 2010 64bit
Novice
Help with a macro which run when opening a doc
 
Join Date: Oct 2014
Posts: 1
bjofo is on a distinguished road
Default Help with a macro which run when opening a doc

Hello!



I'm really new to VBA and really have only just started with VBA for excel, so sorry if my question is very basic.

I've been trying to figure out how to make a macro which run when I open a specific document.

I want to make some kind of macro which asks for name and adress when someone opens the word-document or template. The macro should then fill in the name and adress into the document.

Do anyone here know how to write a macro like that and can help me out?

I know it must be frustrating getting vague questions like this, but I thought I might aswell ask while I continue to go through my VBA tutorials :P

/Björn
Reply With Quote
  #2  
Old 10-16-2014, 10:40 AM
gmaxey gmaxey is online now Help with a macro which run when opening a doc Windows 7 32bit Help with a macro which run when opening a doc Office 2010 (Version 14.0)
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,421
gmaxey is a jewel in the roughgmaxey is a jewel in the roughgmaxey is a jewel in the roughgmaxey is a jewel in the rough
Default

The macro is named Document_Open in the ThisDocument module or you can use an AutoOpen macro in the template.

What you really need is a userform: http://gregmaxey.com/word_tip_pages/..._userform.html
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro Needed to bold specific lines and Macro to turn into CSV anewteacher Word VBA 1 05-28-2014 03:59 PM
Help with a macro which run when opening a doc Prompt a macro to run when opening a specific file type gmanword Word VBA 5 11-30-2013 02:55 PM
custom icon, undo/redo for macro, permanent macro Rapier Excel 0 08-05-2013 06:30 AM
Macro for sending mail and opening the sent mail afterwards Rumlegok Outlook 0 09-20-2011 07:27 AM
How do I assign a macro to a button when the macro is in my personal workbook? foolios Excel Programming 2 07-27-2011 02:41 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 10:51 AM.


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