Outlook macro

Discussion in 'Outlook' started by teza2k06, Jul 13, 2017.

  1. teza2k06

    teza2k06

    Joined:
    Aug 23, 2014
    Messages:
    2
    Likes Received:
    0
    Hi All,
    I have found some basic macro coding online so that when i click a button on my ribbon it will open up the e-mail template
    Code:
    Sub email()
    Set msg = Application.CreateItemFromTemplate("C:\Users\trb19\Desktop\test email.oft")
    msg.Display
    End Sub
    The above code works with no problems.

    However i have used the same coding (below) so that it opens a similar email, but with an attachment that will be sent in the e-mail. I have added this macro to the ribbon, but when i click on this button nothing happens

    Code:
    Sub InterviewPaperwork()
    Set msg = Application.CreateItemFromTemplate("C:\Users\trb19\Desktop\interview record.oft")
    msg.Display
    End Sub
    I am new to this, so it might just be a little error that i have done, but could anyone help me out so that it will open the email template with attachment??

    Many thanks
     
    teza2k06, Jul 13, 2017
    #1
    1. Advertisements

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Similar Threads
  1. maxelcat

    Outlook 2000 takes ages

    maxelcat, Sep 25, 2009, in forum: Outlook
    Replies:
    0
    Views:
    419
    maxelcat
    Sep 25, 2009
  2. jsduiahd
    Replies:
    0
    Views:
    608
    jsduiahd
    Jul 25, 2011
  3. gwynfor
    Replies:
    1
    Views:
    587
    collin12
    Feb 21, 2012
  4. Mudukin

    Outlook 2010 Macro help please

    Mudukin, Dec 5, 2012, in forum: Outlook
    Replies:
    0
    Views:
    740
    Mudukin
    Dec 5, 2012
  5. jonnyollet
    Replies:
    0
    Views:
    671
    jonnyollet
    Oct 18, 2013
  6. Jenny Gentilly
    Replies:
    0
    Views:
    276
    Jenny Gentilly
    Sep 21, 2016
  7. paik1002

    macro for paste and format method

    paik1002, Dec 15, 2016, in forum: Outlook
    Replies:
    0
    Views:
    247
    paik1002
    Dec 15, 2016
  8. Shy
    Replies:
    0
    Views:
    230
Loading...