File Picker for attachment

Status
Not open for further replies.

Nico2010

Member
Outlook version
Outlook 365 64 bit
Email Account
POP3
Hello
I would like a macro that pick a file from a folder and attach it to my email.
Need help getting started.
Thank you
-Nico2010
 
Is it picking a file by name or do you want to open a specific folderr and browser for the file?

For the first, you use attachment.add:


Code:
 Set oMail = objApp.ActiveInspector.CurrentItem
With oMail
    .To = oContact.Email1Address
    .Subject = Left(oDoc.Name, Len(oDoc.Name) - 5)
    'The content of the document is used as the body for the email
    .Body = oDoc.Content
    .Attachments.Add "c:\path to \Documents\instructions.pdf"
    .Display ' .send
End With
 
Is it picking a file by name or do you want to open a specific folderr and browser for the file?

For the first, you use attachment.add:


Code:
 Set oMail = objApp.ActiveInspector.CurrentItem
With oMail
    .To = oContact.Email1Address
    .Subject = Left(oDoc.Name, Len(oDoc.Name) - 5)
    'The content of the document is used as the body for the email
    .Body = oDoc.Content
    .Attachments.Add "c:\path to \Documents\instructions.pdf"
    .Display ' .send
End With
Thank you.
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
P File Picker for attachment Outlook VBA and Custom Forms 0
C Advanced search terms for "Outlook Data File" Using Outlook 1
G Save emails as msg file from Outlook Web AddIn (Office JS) Outlook VBA and Custom Forms 0
E Outlook 365 Save Selected Email Message as .msg File - oMail.Delete not working when SEARCH Outlook VBA and Custom Forms 0
E Save Selected Email Message as .msg File - digitally sign email doesn't works Outlook VBA and Custom Forms 1
W Outlook 365 File access denied attempting to import .pst Using Outlook 6
P Copying ALL calendar entries from Calender in PST file to IMAP OST file? Using Outlook 1
R Saving Emails and Attachments as .msg file Using Outlook 3
M Outlook Macro to save as Email with a file name format : Date_Timestamp_Sender initial_Email subject Outlook VBA and Custom Forms 0
W Create a Quick Step or VBA to SAVE AS PDF in G:|Data|Client File Outlook VBA and Custom Forms 1
Wotme create email only data file Using Outlook 1
C "The linked image cannot be displayed. The file may have been moved, renamed, or deleted. Verify that the link points to the correct file location" Using Outlook 1
L Restoring Outlook from backup pst file Using Outlook 5
W Transfer Outlook 2016 autocomplete file to Outlook 2007 Using Outlook 1
V Backup Calendar, Contacts, Tasks in an POP3 data file Using Outlook 3
DoctorJellybean Use OST file location for fresh installation? Using Outlook 1
HarvMan Exporting IMAP OST file to PST Using Outlook 5
D Forwarding email based on the attachment file type and specific text found on the attachment file name Outlook VBA and Custom Forms 1
N Save Selected Email Message as .msg File Outlook VBA and Custom Forms 12
L Article on merging pst file Using Outlook 1
J Deliver new messages to New or Existing Data File? Using Outlook 2
F VBA to move email from Non Default folder to Sub folders as per details given in excel file Outlook VBA and Custom Forms 11
T vba extract data from msg file as attachment file of mail message Outlook VBA and Custom Forms 1
A Macro to file emails into subfolder based on subject line Outlook VBA and Custom Forms 1
O Comma Separated Values.ADR and A file error has occurred in the translator Using Outlook 6
R Problem moving file “Email folders.pst” to new PC Using Outlook 5
B vBA for exporting excel file from outlook 2016 Outlook VBA and Custom Forms 3
V Pin a document to the "Attach file" Recent Documents list Using Outlook 0
D Outlook 2016 Unable to load Outlook data pst file Using Outlook 5
K Need to convert .mmf file to .pst format Outlook VBA and Custom Forms 7
S save attachment with date & time mentioned inside the file Outlook VBA and Custom Forms 0
E Having some trouble with a run-a-script rule (moving mail based on file type) Outlook VBA and Custom Forms 5
B Can I create a local PST file for SPAM on a drive that is usually disconnected? Using Outlook 3
C Macro to extract sender name & subject line of incoming emails to single txt file Outlook VBA and Custom Forms 3
P Outlook pst file is too huge with POP3. How to save more space? Using Outlook 4
G Cannot Move Autocomplete File to New Computer Using Outlook 15
B Outlook 2013 erratically deleting original file that is attached Using Outlook 0
I Outlook 365 - import/attach PST file that used POP3 Using Outlook.com accounts in Outlook 0
M Deleting attachments does not reduce file size Using Outlook 0
P PST file is getting huge under POP 3 Using Outlook 2
I Saving attachments from multiple emails and updating file name Outlook VBA and Custom Forms 0
F Script for zip file attachment Outlook VBA and Custom Forms 1
M Export-Import .pst file problems Using Outlook 2
L Cannot open PST file for first session each day Using Outlook 6
J Outlook 2010 Changing events in Outlook calendar via opening file, importing CSV Using Outlook 0
S What's in a PST file? Using Outlook 1
S automate save the .xlxs file to share Network Using Outlook 1
L Outlook Office 365 client: won't remember my setting File, not to collapse ribbon Using Outlook 2
B Outlook 2010 Can not find a certain file in M/S Outlook 2010. Using Outlook 1
A Order of Recent Items in Attach File List Using Outlook 5

Similar threads

Back
Top