+ Reply to Thread
Results 1 to 4 of 4

User-defined type not defined.

  1. #1
    Registered User
    Join Date
    07-04-2019
    Location
    Seattle, WA
    MS-Off Ver
    Office 365
    Posts
    6

    User-defined type not defined.

    Hi All,
    New problem***
    The attachments are not showing in the email. I think they're there then they disappear. In the old code, I only had .Body instead of HTMLBody because the signature wasn't there. Now it is with the HTMLBody, but not sure what's impacting the attachments.


    ---thisisfixed--- I basically copied an existing bulk email macro to a new workbook but it's giving me an error: User-defined type not defined. When I click on the definition, it says identifier under cursor is not recognized. Not sure what I am doing wrong. The macro works in the other workbook. I'm getting the raw data from another sheet (same workbook), then have formulas in the actual macro worksheet like concatenating the body. ---thisisfixed---


    Please Login or Register  to view this content.
    Last edited by estra; 07-05-2019 at 12:03 PM.

  2. #2
    Forum Expert
    Join Date
    12-10-2006
    Location
    Sydney
    MS-Off Ver
    Office 365
    Posts
    3,525

    Re: Compile error: User-defined type not defined - on Sub

    Hi estra,

    Welcome to the forum!!

    As the code is using early binding you need to make a reference to the desired object library (Outlook in this case).

    To do this select the Microsoft Outlook [N.N] Object Library option from the list of Available References found from Tools > References menu within the macro editor where N.N is the version number (mine currently is 15.0).

    Regards,

    Robert
    ____________________________________________
    Please ensure you mark your thread as Solved once it is. Click here to see how
    If this post helps, please don't forget to say thanks by clicking the star icon in the bottom left-hand corner of my post

  3. #3
    Registered User
    Join Date
    07-04-2019
    Location
    Seattle, WA
    MS-Off Ver
    Office 365
    Posts
    6

    Re: Compile error: User-defined type not defined - on Sub

    Quote Originally Posted by Trebor76 View Post
    Hi estra,

    Welcome to the forum!!

    As the code is using early binding you need to make a reference to the desired object library (Outlook in this case).

    To do this select the Microsoft Outlook [N.N] Object Library option from the list of Available References found from Tools > References menu within the macro editor where N.N is the version number (mine currently is 15.0).

    Regards,

    Robert
    Thank you Robert!

    That definitely fixed the error on the sub part. New problem though, the attachments are not showing in the email. I think they're there then they disappear. In the old code, I only had .Body instead of HTMLBody because the signature wasn't there. Now it is with the HTMLBody, but not sure what's impacting the attachments.

  4. #4
    Forum Expert
    Join Date
    12-10-2006
    Location
    Sydney
    MS-Off Ver
    Office 365
    Posts
    3,525

    Re: Attachments disappearing in Outlook

    Hi estra,

    You need to start a new thread for each new issue.

    Thanks,

    Robert

+ 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. [SOLVED] Compile error: User-defined type not defined
    By VAer in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 10-12-2017, 10:46 AM
  2. Mac - Compile Error : User Defined type not defined
    By aprildu in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-26-2017, 05:02 AM
  3. Replies: 4
    Last Post: 06-28-2016, 05:38 PM
  4. Compile error: user defined type not defined
    By duhigs in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-23-2014, 07:51 PM
  5. [SOLVED] Compile error: User-defined type not defined
    By XmisterIS in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-21-2014, 09:46 AM
  6. compile error - user defined type not defined
    By TMP123 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-23-2010, 01:42 PM
  7. VB Compile Error - User-defined type not defined
    By dbwiz in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-08-2010, 04:31 PM

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