R
RPMitchal
Outlook 2007
Hello Gurus:
I am attempting to put together what I'm sure is a rather simple macro
within Outlook for an e-mail transmission.
I am using bookmarks (for now using default names) whereby I fill in the
appropriate blanks within the "User Form" in the hopes that the information
from the User Form will be used to populate the applicable bookmarks within
the Template.
The process seems to work flawlessly within Word. However, in using
Outlook, I receive an error: Compile Error: Variable not defined which
applies to the underlined coding below *With ActiveDocument*.
Any assistance in this regard will be greatly appreciated.
Thanks - Rod
Option Explicit
Private Sub CommandButton1_Click()
With ActiveDocument
> Bookmarks("Text1").Range.InsertBefore TextBox1
> Bookmarks("Text2").Range.InsertBefore TextBox2
> Bookmarks("Text3").Range.InsertBefore TextBox3
End With
UserForm1.Hide
End Sub
Hello Gurus:
I am attempting to put together what I'm sure is a rather simple macro
within Outlook for an e-mail transmission.
I am using bookmarks (for now using default names) whereby I fill in the
appropriate blanks within the "User Form" in the hopes that the information
from the User Form will be used to populate the applicable bookmarks within
the Template.
The process seems to work flawlessly within Word. However, in using
Outlook, I receive an error: Compile Error: Variable not defined which
applies to the underlined coding below *With ActiveDocument*.
Any assistance in this regard will be greatly appreciated.
Thanks - Rod
Option Explicit
Private Sub CommandButton1_Click()
With ActiveDocument
> Bookmarks("Text1").Range.InsertBefore TextBox1
> Bookmarks("Text2").Range.InsertBefore TextBox2
> Bookmarks("Text3").Range.InsertBefore TextBox3
End With
UserForm1.Hide
End Sub