none
automatically add variable hyperlink to specific prefixed text typed in Outlook message

    Question

  • URLS frequently can have a variable parameter to fetch a specific field from a web-based interface to a database:

    http://mysite.com/db.aspx?id=12345

    http://mysite.com/db.aspx?id=8281819   

    ..fetch records 12345 and 8281819 respectively and display them in a browser. 

    I refer to various entries in this database a lot in Outlook emails, only our URL is much longer than above and I'd like to be able to just type "db12345" in any Outlook message and have Outlook automatically add a hyperlink to the corresponding string.

    i.e. I want to just type the following in email:

    "John, will you please go look at db12345, and Mike would you please close db87645"

    and those db[0-9] values become hyperlinks.

    Any thoughts on how to do this?  

    Thursday, December 20, 2012 8:35 AM

All replies

  • on custom ribbon button click or ItemSend event grab instance of Document from Inspector.CurrentItem.WordEditor and search for those occurances and replace those ranges with HyperLink objects 
    Thursday, December 20, 2012 8:53 AM
  • Thank you for your quick reply DamianD

    Do you know if this could this potentially be done real-time, like auto-correct? instead of clicking a button or on ItemSend? 

    Thursday, December 20, 2012 10:42 PM
  • i think it could because some posts here described doing things while user typed message, but i do not have any details to share on that topic, maybe someone else could help with this.
    Friday, December 21, 2012 5:42 AM
  • Hi PDXErik,

    Thanks for posting in the MSDN Forum.

    It's based on my experience that Office 2013'a apps can approach your goal. And other versions seems hard to approach your goal. I would recommend your search apps sample for your goal from http://msdn.microsoft.com/en-us/library/office/apps/fp142262.aspx, let's see whether there exists sample for your goal.

    I will involve some experts into your issue to see whether they can help your, there might be some time delay, appreciate for your patience.

    Have a good day,

    Tom


    Tom Xu [MSFT]
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.


    Monday, December 24, 2012 6:47 AM
    Moderator
  • Hi,

    I have an idea, extend Outlook context menu with XML markup script. Scenario like:

    After you type db12345, you select it and pop up the context menu.

    In the new context menu item, click menu item will replace select db12345 to your URL.

    Follow this MSDN page for how to extend context menu: http://msdn.microsoft.com/en-us/library/ee691832.aspx

    best regards,


    Forrest Guo | MSDN Community Support | Feedback to manager

    Thursday, December 27, 2012 3:27 PM
    Moderator