![]() |
#1
|
|||
|
|||
![]()
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 |
#2
|
|||
|
|||
![]()
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 |
![]() |
|
![]() |
||||
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 |
![]() |
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 |