getting the subject line out of a mail

  • Thread starter Thread starter capri_corn_ripe
  • Start date Start date
C

capri_corn_ripe

Hi

I am using following code to get time stamp and subject from a mail
item

Sub TimeStampDigger()

Dim i%, myItem As Outlook.MailItem, excelApp As Object, excelBook
As Object

Set myItem =
Application.Session.GetDefaultFolder(olFolderInbox).Items(1)
myTime = myItem.ReceivedTime

Set excelApp = CreateObject("Excel.Application")
Set excelBook = excelApp.Workbooks
excelBook.Open ("C:\Documents and Settings\n.bansal\Desktop\Report
Delivery Performance")

End Sub

I am having problems in getting the subject.

Kindly help.

Nitesh
 
Hi

I am using following code to get time stamp and subject from a mail
item

Sub TimeStampDigger()

    Dim i%, myItem As Outlook.MailItem, excelApp As Object, excelBook
As Object

    Set myItem =
Application.Session.GetDefaultFolder(olFolderInbox).Items(1)
    myTime = myItem.ReceivedTime

    Set excelApp = CreateObject("Excel.Application")
    Set excelBook = excelApp.Workbooks
    excelBook.Open ("C:\Documents and Settings\n.bansal\Desktop\Report
Delivery Performance")

End Sub

I am having problems in getting the subject.

Kindly help.

Nitesh

Sorry for the 3 posts. My comp had some connectivity probs. :(
 
Simply read the Subject property the same qay you read the ReceivedTime
property.

--
Best regards
Michael Bauer - MVP Outlook
Category Manager - Manage and share your categories:
SAM - The Sending Account Manager:
<http://www.vboffice.net/product.html?lang=en>


Am Sun, 28 Mar 2010 13:29:26 -0700 (PDT) schrieb capri_corn_ripe:
 
Back
Top