Results 1 to 2 of 2
Thread: Macro - VBA (Outlook 2002)
2003-03-05, 12:25 #1
- Join Date
- Mar 2001
- Thanked 0 Times in 0 Posts
Macro - VBA (Outlook 2002)
I don't know VBA. Here is the macro I would like to create in Outlook.
First I would open up a message I received.
Now the macro - I would like to select all the text in the body of the message
Now I want to select copy
Now open up Word 2002
Now edit / paste to Work document from Outlook.
With document data in word still highlighted I need to go to File / Page Setup - change all the margins to .3 and orientation to landscape
Close page setup and change font size to .8 and end macro.
Can the macro be assigned to a shortcut key or Button on the toolbar in Outlook like you can in Word?
Thanks in advance......
2003-03-05, 22:07 #2
- Join Date
- Feb 2001
- Silicon Valley, USA
- Thanked 93 Times in 89 Posts
Re: Macro - VBA (Outlook 2002)
Let me start with the last question first: you can assign a macro to a button and, if you put an "accelerator" key on the button (e.g., the S in Send), you can use an Alt-key combination to run it.
Now, about this document you want to create. You can save yourself a lot of steps by creating a Word template that has the page layout and font size you want. Then, your macro would be simpler:
[list=1]<LI>Create a new Word document using your template
<UL>Dim wrdApp As Word.Application, wrdDoc as Word.Document
' In between, instantiate wrdApp (usually try GetObject first, then CreateObject if necessary)
Set wrdDoc = wrdApp.Documents.Add("newtemplate.dot")