HyperLink to outlook message in public folder

Posted on 2006-05-29
Last Modified: 2008-03-03
Hi all,

I have successfully created an intranet page with links to e-mails in the users' inbox by using:

<a href="Outlook:00274056408540400004456406065">test</a>

where the number is the actual message's ID I got using the EntryID of the message. What I then did is to move the message to a public folder, but then the link above stops working. I checked the message's ID after I moved it and it stays the same. I have found on the net links of the form:

<a href="Outlook://Public Folders/All Public Folders/~subject>test</a>

but they don't work for me since many times the subject of the messages is identical.

Does anyone know how I can put a link to a message in a public folder using its ID got from the EntryID?

Question by:gpsbr
    LVL 76

    Expert Comment

    by:David Lee
    Hi gpsbr,

    The EntryID of the SHOULD NOT be the same in the public folder as it was in the Inbox.  An item's EntryID is based on the message store the item is in.  Public Folders is a different message store than either an online mailbox or any PST file.  The link syntax for opening an item by its EntryID from a public folder is the same as for opening it from an Inbox.


    Author Comment

    Hi BlueDevilFan,

    Just checked what you said and you are right, the ID changes when the message is moved and the link works the same. But how do I know what the new ID is going to be once I move the message?

    LVL 76

    Accepted Solution

    There is no way of knowing what the new ID is going to be.  You'll have to retrieve the ID from the moved item.  Without knowing how you are assembling your intranet page I can't advise on how best to go about this.  You can get it easily enough using a simple bit of VBA script.  Something like this:

    Sub ShowEntryID()
        Dim olkItem As Object
        Set olkItem = Application.ActiveExplorer.Selection(1)
        MsgBox olkItem.EntryID
        Set olkItem = Nothing
    End Sub

    This code will display a pop-up dialog-box showing the EntryID of the currently selected item.

    Author Comment

    Hi BlueDevilFan,
    Just found it. Move is a function, not a sub. all you have to do is:

    set test = curitem.move(destinationfolder)

    and then


    gives you the new ID.

    I will give you the points. Thanks for the prompt help!
    LVL 76

    Expert Comment

    by:David Lee

    You're welcome.  Glad I could help out.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Learn more about the importance of email disclaimers with our top 10 email disclaimer DOs and DON’Ts.
    Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
    This Experts Exchange video Micro Tutorial shows how to tell Microsoft Office that a word is NOT spelled correctly. Microsoft Office has a built-in, main dictionary that is shared by Office apps, including Excel, Outlook, PowerPoint, and Word. When …
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    10 Experts available now in Live!

    Get 1:1 Help Now