+ Reply to Thread
Results 1 to 6 of 6

VBA code working in Outlook 2010 but not in 2013

  1. #1
    Registered User
    Join Date
    09-22-2015
    Location
    Amsterdam
    MS-Off Ver
    MS Office 2013
    Posts
    5

    VBA code working in Outlook 2010 but not in 2013

    Hi All,

    My vba code is working in outlook 2010 but not in outlook 2013 unfortunately. I hope one of you is able to help me. Please let me know if you need any more information.

    The error starts at the following line of code:
    Please Login or Register  to view this content.
    Below is the full code:
    Please Login or Register  to view this content.
    Thanks in advance!

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: VBA code working in Outlook 2010 but not in 2013

    What's the error message?

    Do you have any items marked as MISSING when you goto Tools>References...?
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    09-22-2015
    Location
    Amsterdam
    MS-Off Ver
    MS Office 2013
    Posts
    5

    Re: VBA code working in Outlook 2010 but not in 2013

    Thank you Norie for your quick reply.

    I get the following error message:
    Run-time error "438": Object doesn't support this property or method.
    I don't have any items marked as missing.

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: VBA code working in Outlook 2010 but not in 2013

    What are you actually trying to do with that line of code?

    objItem is a mail item, are you trying to set the body of the email, the subject...?

  5. #5
    Registered User
    Join Date
    09-22-2015
    Location
    Amsterdam
    MS-Off Ver
    MS Office 2013
    Posts
    5

    Re: VBA code working in Outlook 2010 but not in 2013

    In the beginning of the code I'm adding a unique number to the subject. for example the subject of the email was: "Welcome to excelforum" and the code changes it to : "Welcome to excelforum #memberid 2321".

    At the code where the first error originates:
    Please Login or Register  to view this content.
    I'm looking if this email already received a unique number. If it has the subject of the e-mail has an "#" sign.

    If it doesnt have the "#" sign the position of the sign would be 0 and a new unique number is added. If it has a unique sign the number won't be added again.

    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    09-22-2015
    Location
    Amsterdam
    MS-Off Ver
    MS Office 2013
    Posts
    5

    Re: VBA code working in Outlook 2010 but not in 2013

    I found a solution to my problem by just trying different things :D

    I don't know if this is the cleanest solution, but hey it works!

    I created an extra variable as a string, which I use to assign the position of the # sign instead of ObjItem which was from the type of Outlook.Mailitem.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. VBA code working in Outlook 2010 but not in 2013
    By fiffers in forum Outlook Formatting & Functions
    Replies: 0
    Last Post: 09-22-2015, 05:16 AM
  2. Macros 2010 Not working in Excel 2013
    By waqarqrl in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-02-2015, 03:57 AM
  3. VBA working in Excel 2013 but not 2010
    By sb2323 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-21-2015, 07:26 AM
  4. Code works for outlook 2010 but not 2013
    By Legend Rubber in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-13-2015, 05:00 PM
  5. Macro code working fine in excel 2013 but not in excel 2010.
    By sere in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-10-2014, 02:23 AM
  6. Macro from 2010 not working correctly in 2013
    By Phixer in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-26-2014, 12:24 PM
  7. VBA Working in Excel 2010 and not 2013
    By Jason*** in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-04-2014, 11:28 AM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1