Results 1 to 4 of 4
  1. #1
    New Lounger
    Join Date
    Apr 2002
    Location
    Melbourne, Australia
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Visibility of Field values in Inbox view (Outlook 2000)

    Folks,

    I'm using a VBA macro to set the "Mileage" property of new mail items as they come in (see code below), but the Mileage field in the Inbox view remains stubbornly blank. Does anyone know why the value I set doesn't appear in the View? (Note that a message box on the new mail item shows that other properties (eg. SenderName) are correct, so I think I'm accessing the object correctly)

    thanks,

    --------------------------
    Code...

    Private Sub Application_NewMail()

    Dim onMAPI As NameSpace
    Dim ofFolder As MAPIFolder
    Dim omNewMail As MailItem

    Set onMAPI = GetNamespace("MAPI")
    Set ofFolder = onMAPI.GetDefaultFolder(olFolderInbox)

    Set omNewMail = ofFolder.Items.GetFirst
    omNewMail.Mileage = "Set"

    End Sub

    ---------------------------

  2. #2
    New Lounger
    Join Date
    Apr 2002
    Location
    Melbourne, Australia
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Visibility of Field values in Inbox view (Outlook 2000)

    More info.....

    Actually, I can't seem to permanently set ANY values (eg. I tried to augment the body of the message with a bit of text, but that didn't work either). It looks like I've somehow got a COPY of the message, and not the "real" one. Is that it? How can I reference the REAL message?

  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: Visibility of Field values in Inbox view (Outlook 2000)

    <P ID="edit" class=small>Edited by jscher2000 on 22-Apr-02 22:10.</P>One thought: In my inbox, GetFirst returns the oldest message (circa 1998), and GetLast the newest. Are you sure your code is changing the message you think it is?

    - Oops, you are checking that it is the right message. Never mind.


    Another thought: You might need to call the Save method in order to see the change.

  4. #4
    New Lounger
    Join Date
    Apr 2002
    Location
    Melbourne, Australia
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Visibility of Field values in Inbox view (Outlook 2000)

    AHA!! The "Save" did it ... Thanks!

Posting Permissions

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