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.
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.
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.
Try this.
Please Login or Register to view this content.
If posting code please use code tags, see here.
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
Didn't work strFileName only contains the filename
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
Change the save path to suit.
Please Login or Register to view this content.
Yes and that doesn't work
Please Login or Register to view this content.
[QUOTE=elfor;4667239]Yes and that doesn't work
Care to elaborate?
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.
Yup allready tried that
Please Login or Register to view this content.
It'swithout the equals sign. It's a method, not a property.Please Login or Register to view this content.
Omg thank you solved
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks