OL2003 - designing a macro
From: KePaHa (anonymous_at_anon.com)
Date: 06/17/04
- Next message: Mike Goodwin: "Outlook Web access"
- Previous message: Lanwench [MVP - Exchange]: "Re: oe keeps deleting attachments"
- In reply to: Jeff: "OL2003 - designing a macro"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 17 Jun 2004 16:53:17 -0700
Here is a sample that might get you going in the right
direction. It has no error trapping, so it will only
work if you first select the desired contact and then run
the macro (which can be assigned to a toolbar button:
Sub MacroTrial()
Dim olApp As Outlook.Application
Dim olContact As Outlook.ContactItem
Dim objMail As Outlook.MailItem
Dim sBody As String
Set olApp = Outlook.Application
Set objMail = olApp.CreateItem(olMailItem)
Set olContact = Outlook.ActiveExplorer.Selection.Item(1)
sBody = "Follow-up Needed: " & olContact.FullName &
vbCrLf & vbCrLf & "email address: " &
olContact.Email1Address
With objMail
.Body = sBody
.Display
End With
End Sub
>-----Original Message-----
>I would like to make a button for a contact form that
>takes information from the contact form and enters it
>automatically into an email. The button would be called
>PROFILE and when depressed or clicked would take, First
>Name, Last Name, email address, phone number and a
number
>of other fields from the contact form and would
>automatically enter them into an email so it looks like
>this:
>
>PROFILE:
>Full Name: Jeff Strachan
>email: jeff@footprintsrecruiting.com
>home phone: (604) 677-6556
>
>Anyone have any ideas? I suspect I have to create a
macro
>but I have never tried to make one before... this looks
>challenging... Please help!
>
>.
>
- Next message: Mike Goodwin: "Outlook Web access"
- Previous message: Lanwench [MVP - Exchange]: "Re: oe keeps deleting attachments"
- In reply to: Jeff: "OL2003 - designing a macro"
- Messages sorted by: [ date ] [ thread ]