The Code Cage - Microsoft Office help Free Microsoft Office Help for all Applications!  

To stop seeing these ads and get other benefits check This page!

Go Back   The Code Cage Forums > Members - Microsoft Topics > Members - Outlook Forum > Members - Outlook Macro's & VBA
  Chat In Use Now! Microsoft Office Chat Online now!


Members - Outlook Macro's & VBA Members, post questions in this forum if they are related to using Microsoft Outlook VBA & Macro's to automate tasks.
If you recieve no reply within 1 day your thread will be reposted in the newsgroups with a redirect here.

Hey there!

It looks like you're enjoying but haven't created an account yet. Why not take a minute to register for your own free account now? As a member you get free access to all of our forums and posts plus the ability to post your own messages, communicate directly with other members and much more. Register now!

Already a member? Login at the top of this page to stop seeing this message.


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 25th January 2010, 05:05 PM
Junior Member
MS Office Version: MS Office 2007
MS Office Skill Level: Proficient with MS Office


My Top Tip Count: 0

 
Join Date: Jan 2010
Location: Houston, TX
Posts: 1
Thanks to others: 0
Thanked 0 Times in 0 Posts
Chats: 0
Rep Power: 0
mikera is on a distinguished road
Default New Email Macro

------ Register to get rid of these "In Post" ads! ------


I need some assistance creating a VBA macro for an email that I send out frequently to different recipients, but always the same subject/body. Below is what I have but cannot seem to get the body of the email in there w/o receiving an error.

Sub NewMail()
Dim objOLApp As Outlook.Application
Dim NewMail As Outlook.MailItem
Set objOLApp = New Outlook.Application
Set NewMail = objOLApp.CreateItem(olMailItem)
NewMail.SentOnBehalfOfName = "email@domain.com"
NewMail.Display
End Sub
Reply With Quote


Did you find this post helpful? Yes | No

The Code Cage Advertisment
Advertisement

To stop seeing these ads and get other benefits check This page!
  #2 (permalink)  
Old 25th January 2010, 07:57 PM
Simon Lloyd's Avatar
Administrator
MS Office Version: MS Office 97, 2003, 2007
MS Office Skill Level: Can use most of MS Office


My Top Tip Count: 5

 
Join Date: Aug 2008
Location: Manchester, England
Age: 45
Posts: 1,921
Thanks to others: 3
Thanked 74 Times in 73 Posts
Chats: 656
Rep Power: 10
Simon Lloyd has much to be proud ofSimon Lloyd has much to be proud ofSimon Lloyd has much to be proud ofSimon Lloyd has much to be proud ofSimon Lloyd has much to be proud ofSimon Lloyd has much to be proud ofSimon Lloyd has much to be proud ofSimon Lloyd has much to be proud ofSimon Lloyd has much to be proud of
5 Top Tips
Wales
Default Re: New Email Macro

------ Register to get rid of these "In Post" ads! ------


It's well documented here Using Automation to Send a Microsoft Outlook Message
__________________
Regards,
Simon Lloyd
Excel Chat
Reply With Quote


Did you find this post helpful? Yes | No
  #3 (permalink)  
Old 20th February 2010, 03:12 AM
Junior Member
MS Office Version: depends on the flat I'm staying in (experienced in 2003)
MS Office Skill Level: Can use VBA


My Top Tip Count: 0

 
Join Date: May 2009
Location: currently London, England
Posts: 67
Thanks to others: 0
Thanked 1 Time in 1 Post
Chats: 0
Rep Power: 1
broro183 is on a distinguished road
New_Zealand
Default Re: New Email Macro

------ Register to get rid of these "In Post" ads! ------


hi Mikera,

Welcome to the Forum

Here is a page of links on Ron Debruin's site that may have some different examples to Simon's MS link.

Edit: Ooopps! here's the link: Example Code for sending mail from Excel

hth
Rob
__________________
Rob Brockett. Always learning & the best way to learn is to experience...

Last edited by broro183; 20th February 2010 at 03:14 AM. Reason: added link
Reply With Quote


Did you find this post helpful? Yes | No
The Code Cage Advertisment
Advertisement

To stop seeing these ads and get other benefits check This page!
Reply

Bookmarks

Tags
email, macro


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

The Code Cage Affilliates


To stop seeing these ads and get other benefits check This page!



All times are GMT +1. The time now is 06:17 AM.


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.3.2
No part of this board may be copied or reproduced either in part or full without the express permission of The Code Cage Team.
We are not associated with nor employed by Microsoft in any way, we simply provide resources!
All MS office icons are registered trademarks of the application the represent