Attach a File in Outlook E-Mail
Is there a way to Attach a File in Outlook E-Mail by using textexpander or Shortcut?
Try this (Type: Command):
Code: Select all
m:=ComObjCreate("Outlook.Application").CreateItem(0)
m.Subject:="Attachment"
m.To:="[email protected]"
m.Body:="Please find attached..."
m.Attachments.Add("D:\MyFile.txt")
m.Display
m:=""
Thank you, Tom, for sharing this code.
This code helps me to draft a new email every time I type the textexpander text. It works perfectly if I want to draft a new mail every time with the same preferences.
But, my purpose is different. Let me brief you.
I need to share just an attachment (for example a company profile) from a different email.
So I draft the email and attach the pdf file.
Every time the file remains the same which I need to attach. So I just need to create a shorthand to attach/paste the file.
I don't want to create a new email.
This code helps me to draft a new email every time I type the textexpander text. It works perfectly if I want to draft a new mail every time with the same preferences.
But, my purpose is different. Let me brief you.
I need to share just an attachment (for example a company profile) from a different email.
So I draft the email and attach the pdf file.
Every time the file remains the same which I need to attach. So I just need to create a shorthand to attach/paste the file.
I don't want to create a new email.
Then you can simply copy the file and paste it to the mail.