+ Reply to Thread
Results 1 to 3 of 3

Get data from Outlook like From, To, Subject, Receive Time

  1. #1
    Registered User
    Join Date
    10-15-2018
    Location
    india
    MS-Off Ver
    2016
    Posts
    0

    Get data from Outlook like From, To, Subject, Receive Time

    I am trying to capture outlook mail response time in this below method, i get received time and mail sender name but i have one issue is if i select other mail like other than open current mail item parent mail, it capture selected mail information.

    I want to current open mail item received time and sender name anyone help me to get that data from current item outlook header stamp like

    From: Sent: To: Subject:

    Thank you for your valuable timing and helping.

    Set objItems = ActiveExplorer.Selection.Item(1)
    RecievedTime = objItems.ReceivedTime
    Set objItem = objOutlook.ActiveInspector.CurrentItem


    Dim objPrope As Outlook.UserProperty

    Set UserPrope = objItem.UserProperties.Find("RT")
    If Not UserPrope Is Nothing Then
    strCurrent = objItem.UserProperties("RT").Value
    End If
    Set objPrope = objItem.UserProperties.Add("RT", olDateTime, True)
    objPrope.Value = Date_String
    Err.Clear

    Dim Sen As String
    Sen = objItems.Sender

    Set objItem = objOutlook.ActiveInspector.CurrentItem
    Set UserPropr = objItem.UserProperties.Find("RN")
    If Not UserPropr Is Nothing Then
    strCurrent = objItem.UserProperties("RN").Value
    End If
    Set objPropr = objItem.UserProperties.Add("RN", olText, True)
    objPropr.Value = Sen
    Err.Clear

    Set objItem = objOutlook.ActiveInspector.CurrentItem
    objItem.Save

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166
    Hello shavas,

    Welcome to Excelforum. Be a part of large Excel community. Enjoy Learning.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  3. #3
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,619

    Re: Get data from Outlook like From, To, Subject, Receive Time

    Hi,

    As you may be read description of this sub-forum - this one is solely to introduce yourself.

    So here I'd say: welcome to the forum. And that's it.

    With your merit question, please go to appropriate sub-forum. Look what sub-forums we have: http://www.excelforum.com/microsoft-...el-help-forum/ and post a new thread in one of them (the most appropriate one).

    and please observe https://www.excelforum.com/forum-rul...rum-rules.html - for instance Rule 2 about CODE tags
    Best Regards,

    Kaper

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Use Date in cell to trigger email via outlook, taking data from row as part of subject
    By galvinpaddy in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-15-2015, 08:34 AM
  2. receive email in format html from Outlook
    By davide2574 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-15-2015, 05:47 AM
  3. set a rule to delete the mails with the subject "Hello" and not receive today
    By mrkhchan in forum Outlook Formatting & Functions
    Replies: 0
    Last Post: 03-13-2015, 11:39 AM
  4. [SOLVED] Search and Flag the Emails in Outlook based on the Data in Excel (Subject column)
    By anchuri_chaitanya in forum Outlook Programming / VBA / Macros
    Replies: 9
    Last Post: 03-17-2012, 12:35 AM
  5. Want to receive results via mail from source other than outlook
    By treasaigh in forum Outlook Programming / VBA / Macros
    Replies: 0
    Last Post: 04-04-2011, 10:51 AM
  6. Send and receive without display outlook application
    By Calaozao in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-07-2006, 11:16 AM
  7. Replies: 1
    Last Post: 07-13-2005, 05:05 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1