PC Review


Reply
Thread Tools Rate Thread

create mailItem

 
 
New Member
Join Date: May 2011
Posts: 1
 
      16th May 2011
I'm new in programing and have to develop an application to create a mail item and then browse to add some files, but I'm having problems when creating the new mail item; I've been looking in MSDN and found this code but can't get to work:

PrivateSub creamail()
Dim mailItem As Outlook.MailItem = Me.Application.CreateItem(Outlook.OlItemType.olMailItem)
mailItem.Subject =
"This is the subject"
mailItem.To = "(E-Mail Removed)"
mailItem.Body = "This is the message."
mailItem.Importance = Outlook.OlImportance.olImportanceLow
mailItem.Display(
True)
EndSub

I'm getting "= Me.Application." is not a member of the solution
How can I correct this???



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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 Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How can I create a new MailItem inside a user folder? Ken Slovak - [MVP - Outlook] Microsoft Outlook Program Addins 1 19th Apr 2010 02:38 PM
Create a forwarded mailitem that has a flag but requires user to s mkp1702 Microsoft Outlook VBA Programming 1 10th Mar 2008 05:44 AM
how to create attachment for a mailitem in outlook sunilmatta Microsoft Outlook Program Addins 0 25th Apr 2007 01:31 PM
Problem trying to create mailitem from Access if Outlook wasn't running Richard Sherratt Microsoft Outlook Interoperability 0 21st Jun 2006 02:38 AM
How can I create a MailItem that displays like a received MailItem ? Clive Microsoft Outlook Form Programming 0 27th Feb 2006 04:14 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:31 AM.