+ Reply to Thread
Results 1 to 14 of 14

run-timer error 438 trying to attach file to outlook

  1. #1
    Registered User
    Join Date
    05-31-2017
    Location
    IRL
    MS-Off Ver
    No idea
    Posts
    12

    run-timer error 438 trying to attach file to outlook

    run-timer error 438 trying to attach file to outlook

    Not sure if i'm using file = correct (set file) do not work, or if it's something else.

    Please Login or Register  to view this content.
    Last edited by elfor; 05-31-2017 at 02:41 PM.

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: run-timer error 438 trying to attach file to outlook

    Here's a step-by-step guide with code.

    Email one sheet as PDF attachment.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

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

    Re: run-timer error 438 trying to attach file to outlook

    Try this.
    Please Login or Register  to view this content.
    If posting code please use code tags, see here.

  4. #4
    Registered User
    Join Date
    05-31-2017
    Location
    IRL
    MS-Off Ver
    No idea
    Posts
    12

    Re: run-timer error 438 trying to attach file to outlook

    Quote Originally Posted by AlphaFrog View Post
    Here's a step-by-step guide with code.

    Email one sheet as PDF attachment.
    Alot of excel specific stuff (xls files) otherwise it was the same except destwb and attachtents.add destwb.fullname did not work in my case will se if I can find the path to my file somehow
    Quote Originally Posted by Norie View Post
    Try this.
    Please Login or Register  to view this content.
    Quote Originally Posted by elfor View Post
    run-timer error 438 trying to attach file to outlook

    Not sure if i'm using file = correct (set file) do not work, or if it's something else.

    Please Login or Register  to view this content.
    Didn't work strFileName only contains the filename

  5. #5
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: run-timer error 438 trying to attach file to outlook

    Quote Originally Posted by elfor View Post
    Alot of excel specific stuff (xls files) otherwise it was the same except destwb and attachtents.add destwb.fullname did not work in my case will se if I can find the path to my file somehow
    Your original code does not define a path for the file name. So it saves to the last used windows path which could be anything.

    Define the path when you define the file name. Then you know the path. e.g;
    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    05-31-2017
    Location
    IRL
    MS-Off Ver
    No idea
    Posts
    12

    Re: run-timer error 438 trying to attach file to outlook

    Quote Originally Posted by AlphaFrog View Post
    Your original code does not define a path for the file name. So it saves to the last used windows path which could be anything.

    Define the path when you define the file name. Then you know the path. e.g;
    Please Login or Register  to view this content.
    Lol yes, just figured that out but it still doesn't work :D

    Runtime error 438 object doesnt support this property or method, next step might be to check if Excel 2010 (european/swedish) version really supports this but can't see why not. Or if i need to define as type or something somehow im just a vbscript guy vbscript doesn't need stuff defined

  7. #7
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: run-timer error 438 trying to attach file to outlook

    Quote Originally Posted by elfor View Post
    Lol yes, just figured that out but it still doesn't work :D

    Runtime error 438 object doesnt support this property or method, next step might be to check if Excel 2010 (european/swedish) version really supports this but can't see why not. Or if i need to define as type or something somehow im just a vbscript guy vbscript doesn't need stuff defined
    Change the save path to suit.

    Please Login or Register  to view this content.

  8. #8
    Registered User
    Join Date
    05-31-2017
    Location
    IRL
    MS-Off Ver
    No idea
    Posts
    12

    Re: run-timer error 438 trying to attach file to outlook

    Yes and that doesn't work

    Please Login or Register  to view this content.

  9. #9
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: run-timer error 438 trying to attach file to outlook

    [QUOTE=elfor;4667239]Yes and that doesn't work



    Care to elaborate?

  10. #10
    Registered User
    Join Date
    05-31-2017
    Location
    IRL
    MS-Off Ver
    No idea
    Posts
    12

    Re: run-timer error 438 trying to attach file to outlook

    [QUOTE=AlphaFrog;4667240]
    Quote Originally Posted by elfor View Post
    Yes and that doesn't work



    Care to elaborate?
    Runtime error 438 object doesnt support this property or method

  11. #11
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: run-timer error 438 trying to attach file to outlook

    Hi,

    A MailItem does not have an Attachment property. You must use .Attachments.Add with the full file path and name.
    Don
    Please remember to mark your thread 'Solved' when appropriate.

  12. #12
    Registered User
    Join Date
    05-31-2017
    Location
    IRL
    MS-Off Ver
    No idea
    Posts
    12

    Re: run-timer error 438 trying to attach file to outlook

    Quote Originally Posted by xlnitwit View Post
    Hi,

    A MailItem does not have an Attachment property. You must use .Attachments.Add with the full file path and name.
    Yup allready tried that

    Please Login or Register  to view this content.

  13. #13
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: run-timer error 438 trying to attach file to outlook

    It's
    Please Login or Register  to view this content.
    without the equals sign. It's a method, not a property.

  14. #14
    Registered User
    Join Date
    05-31-2017
    Location
    IRL
    MS-Off Ver
    No idea
    Posts
    12

    Re: run-timer error 438 trying to attach file to outlook

    Omg thank you solved

+ 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 to convert sheet to PDF file and attach it to outlook
    By hassan khansa in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-04-2016, 10:28 AM
  2. Attach file and send in outlook
    By mohansingh in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-31-2015, 12:18 PM
  3. Attach last saved file outlook/add this to quick step in Outlook
    By Nravota in forum Outlook Programming / VBA / Macros
    Replies: 0
    Last Post: 06-25-2015, 06:25 AM
  4. [SOLVED] Macro to attach an additional file to and outlook email
    By Groovicles in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-18-2014, 01:27 PM
  5. [SOLVED] Macro to attach the file to Outlook from excel
    By Kiran Kurapati in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 04-07-2014, 12:24 PM
  6. Macro to attach the file to Outlook from excel
    By Kiran Kurapati in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-07-2014, 08:52 AM
  7. [SOLVED] attach file from folder on c:\ to outlook mail and send
    By cfinch100 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-24-2013, 11:33 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