none
Can an Outlook Macro let me swipe text in an email, then open a web app (JIRA) to display a specific page? RRS feed

  • Question

  • I'm new to Outlook macros, so I'm not sure how to search for other posts related to my requirement.

    I receive emails from users asking for the status of an issue in our JIRA system. I would like to swipe the JIRA issue# in the email body and then have the macro open our JIRA app and pull up the specific incident.

    The URL to JIRA is consistent, and with a specific issue# at the end, it will open the issue.
    For example - The email will have 'CPBA-3535' in the body, and the JIRA page would look like this;
        https://jira.blue.com/browse/CPBA-3535

    If someone can give me a tip for how to do this, I'll do the research and give it a try.

    Thanks,
    Mike

    Friday, March 16, 2018 8:02 PM

All replies

  • Process the message when it arrives (Application.NewMailEx event), and replace all relevant text with an appropriate link (use MailItem.HTMLBody property).

    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.5 is now available!

    Friday, March 16, 2018 8:21 PM
  • Hi Mike Wyller,

    You can refer links below to get more information and it will be helpful to implementing the suggestion given by Dmitry Streblechenko _MVP_

    Application.NewMailEx Event (Outlook)

    MailItem.HTMLBody Property (Outlook)

    Below is an example of replace that you may try to modify as per your requirement.

    Dim myItem As Outlook.MailItem
    Dim strContact As String
    Dim strCompanyName As String
    Dim strHTML As String
    
    
    Set myItem = Application.CreateItemFromTemplate("C:\file location\file.oft")
    strHTML = myItem.HTMLBody
    strContact = InputBox("What is the Contact's name?")
    myItem.HTMLBody = Replace(myItem.HTMLBody, "%CONTACT%", strContact)
    
    myItem.Display
    End Sub

    Regards

    Deepak


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, March 19, 2018 4:48 AM
    Moderator
  • Hi Mike Wyller,

    Is your issue is solved now?

    I find that you did not done any follow up after creating this thread.

    If your issue is fixed by you then I suggest you to post your solution and mark it as an answer.

    If your issue is still exist then try to refer the suggestions given by the community members.

    If you think that the suggestions given by the community member can solve your issue then mark the helpful suggestion as an answer.

    It will help us to close this thread and it also can be helpful to other community members who will meet with same kind of issues in future.

    If you have any further questions then you can let us know about it, We will try to provide you further suggestions to solve it.

    I suggest you to update the status of this thread and take appropriate actions to close it.

    Thanks for your understanding.

    Regards

    Deepak


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, March 23, 2018 9:48 AM
    Moderator