Results 1 to 3 of 3
  1. #1
    Star Lounger
    Join Date
    Aug 2001
    Location
    GA
    Posts
    52
    Thanks
    0
    Thanked 0 Times in 0 Posts

    How to get contents of a Reportitem (Office2K vba)

    How do I get the "senders" name and the message Read/Not Read status from the body of a reportitem message? The only thing I seem to be able to get is the subject line.

    Thanks,
    Bruce

  2. #2
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts

    Re: How to get contents of a Reportitem (Office2K vba)

    Hi,
    For the first bit you can just use the UnRead property of the reportitem. For the sender you can use something along the lines of:
    <pre>itm.GetInspector.CurrentItem.SenderName
    </pre>

    Hope that helps.
    Regards,
    Rory

    Microsoft MVP - Excel

  3. #3
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: How to get contents of a ReportItem (OL 2000)

    <P ID="edit" class=small>Edited by jscher2000 on 23-Apr-02 15:51.</P>I've started using this technique to explore the properties of an object:
    <pre>Sub SniffReportItem()
    ' A ReportItem must be open for this to work
    Dim itm As ReportItem
    Set itm = ActiveInspector.CurrentItem
    Stop 'use View | Locals to inspect property values
    Set itm = Nothing
    End Sub</pre>

    There is a trick for retrieving the Sender's address using the Reply method, but a ReportItem does not have a Reply method. In this case, you probably have to retrieve the message headers using MAPI, or Redemption (a third party library) or the SendKeys kludge.

Posting Permissions

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