A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Using Bookmarks and User Form within Outlook



 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old December 18th 09, 02:33 PM posted to microsoft.public.outlook.program_vba
RPMitchal
external usenet poster
 
Posts: 2
Default Using Bookmarks and User Form within Outlook

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

 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA help window: Multiple windows/tabs, bookmarks, bookmarks/historypane [email protected] Outlook and VBA 4 May 19th 09 02:09 PM
Open Appointment form from User Form code and add the attemdee ite masani paresh[_2_] Outlook - Using Forms 2 February 11th 09 11:59 AM
Outlook Hyperlinks with Bookmarks [email protected] Outlook - General Queries 1 September 25th 06 09:35 PM
How do I tell when a user has cancelled changes on an Outlook form? Anne Outlook and VBA 1 May 18th 06 12:09 PM
Favourites/bookmarks Percy Outlook Express 4 February 26th 06 02:24 PM


All times are GMT +1. The time now is 03:36 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright 2004-2025 Outlook Banter.
The comments are property of their posters.