I want to Populate Popup box while sending any email with attachment.

Status
Not open for further replies.

rohit

Member
Outlook version
Outlook 2013 64 bit
Email Account
Hi Everyone,

I am new in outlook and I want to create a Macro in outlook 2013. If I am attaching anything in email then a popup box should appear with the statement “You are attaching a file. Please check if "XYZ" field available in the attachment” Press YES or NO. Also in the popup box should be one check box If I checked the button then a "statement note" should be include with the email.


For Example:

I am attaching any excel file.

when I clicked on send button then a pup box should populate with "You are attaching a file. Please check if "XYZ" field available in the attachment” In pup box should have one "check box" If I click on check box then a note will include in the mail. I if i click NO them mail should not sent and If i click YES the mail should be send without including any note.
 

Michael Bauer

Senior Member
Outlook version
Outlook 2010 32 bit
Email Account
Exchange Server
See the ItemSend event, which is triggered when you click the Send button. In that event check for item.attachments.count

If the Checkbox is really necessary, you' need to add a MSForm to the VBA project, and add all the controls and their logic to it yourself. I'd recommend using the MsgBox function instead with the buttons Yes, No, and Cancel. That's just one line of code. 'Yes' could be for 'send with note', 'No' for 'send without note, and 'Cancel' for 'don't send'.
 

rohit

Member
Outlook version
Outlook 2013 64 bit
Email Account
Thank you Michael for your reply, You are right the MsgBox with the buttons YES, NO and Cancel would be fine. But I have not idea about outlook macro codding of outlook. Can you please make this easy for me.

Thanks in advance.
 

rohit

Member
Outlook version
Outlook 2013 64 bit
Email Account
See the ItemSend event, which is triggered when you click the Send button. In that event check for item.attachments.count

If the Checkbox is really necessary, you' need to add a MSForm to the VBA project, and add all the controls and their logic to it yourself. I'd recommend using the MsgBox function instead with the buttons Yes, No, and Cancel. That's just one line of code. 'Yes' could be for 'send with note', 'No' for 'send without note, and 'Cancel' for 'don't send'.

Thank you Michael for your reply, You are right the MsgBox with the buttons YES, NO and Cancel would be fine. But I have not idea about outlook macro codding of outlook. Can you please make this easy for me.

Thanks in advance.
 

Michael Bauer

Senior Member
Outlook version
Outlook 2010 32 bit
Email Account
Exchange Server
Try this, you just need to add the note
Code:
Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
  if item.attachments.count then
    select case  msgbox("bla", vbyesnocancel)
    case vbyes
      'user has clicked on yes, add the note
    case vbno
      'no note
    case vbcancel
       cancel=true
    end select
  endif
End Sub
 
Status
Not open for further replies.
Thread starter Similar threads Forum Replies Date
rohit I want to Populate Popup box while sending any email with attachment Using Outlook 1
C Custom Outlook Form - Populate Information from Radio Button / Check Box Using Outlook 0
C Trying to populate an appointment ComboBox from Excel Outlook VBA and Custom Forms 2
A Populate Listbox from Txt File Outlook VBA and Custom Forms 0
A Populate Textbox from Txt File Outlook VBA and Custom Forms 1
M Adding Macro to populate "to" "subject" "body" not deleting email string below. Outlook VBA and Custom Forms 5
Diane Poremsky Outlook VBA: Use a Text File to Populate a ListBox New Slipstick.com Articles 0
T populate calendar with appointments and send reminders Using Outlook 1
A Populate Excel from Outlook Userform Outlook VBA and Custom Forms 3
J Live Meeting Location populate from body Outlook VBA and Custom Forms 4
A How can I populate a dropdown list? BCM (Business Contact Manager) 4
A Cannot populate IMAP folders Using Outlook 1
S Pre populate subject + body + attachment to already open email in outlook 2007 Using Outlook 2
S Populate textbox values from one form to another form. Using Outlook 0
B Auto Populate From Field Using Outlook 3
J calendar: populate multiple appointment subject fields at once Using Outlook 4
D Reply to a sender does not populate the To: Field Using Outlook 1
K Quickest way to populate email via IMAP up to a server. Using Outlook 1
M Exchange and IMAP Accounts: Populate Exchange Calendar with IMAP Meeting Requests Using Outlook 1
L Can't populate History of Business Contacts- receive 1st error: cannon load an object because it is not available, then 2nd: Cannot display this view Using Outlook 1
A Uploaded Outlook Contacts Will Not Populate Email Address Using Outlook 2
9 BCM 2010 populate created/due field for created Direct Mail Print Using Outlook 4
N Activities Tab does not populate with all linked activity Using Outlook 3
G Populate an Outlook 2007 template with spreadsheet data. Outlook VBA and Custom Forms 1
R Populate Form with appointments from Calendar Outlook VBA and Custom Forms 1
J populate word template from Outlook custom form Outlook VBA and Custom Forms 2
G Populate BCC field with all Contacts within a Contact Folder Outlook VBA and Custom Forms 4
M Create new Contacts folder and populate it from Access Outlook VBA and Custom Forms 1
A Macro - Open new message, populate from and subject fields, and message text Outlook VBA and Custom Forms 1
G Macro: Create New Message and Auto populate To Field Outlook VBA and Custom Forms 5
S populate body with Word data Outlook VBA and Custom Forms 7
L how to populate multiple users contacts Outlook VBA and Custom Forms 9
A Populate task field based on value of other field Outlook VBA and Custom Forms 9
D Prevent popup of "Do you want to save changes?" when closing after opening an appointment to view Outlook VBA and Custom Forms 2
GregS Outlook 365 blocked by Google popup Using Outlook 2
L How do you turn off Outlook contacts "hints" popup Using Outlook 2
I Windows 10 - .msg files on disk show Explorer popup error Using Outlook 5
T Unable to 'Upload a file' using popup 'Browse' button Using Outlook 0
moron save as & file location dialog box popup Outlook VBA and Custom Forms 2
P Country name no longer shows in Phone number popup? Using Outlook 5
P POP mail password popup after I deleted the accopunt Using Outlook 6
L Auto-set followup/reminder popup box for ALL sent emails. Using Outlook 0
M Cannot change category in inbox; Can change it in popup Using Outlook 0
C Disabling "Do you want to save changes?" Meeting Popup? Using Outlook 0
T Outlook 2007 SSL selfsigned certificate how to stop security popup everytime? Using Outlook 10
H Popup asks for password of an email account Using Outlook 1
I Notification/Popup Box not showing on right side Using Outlook 1
M cannot disable autoconfiguration popup/message in outlook 2007 Using Outlook 2
R Exchange System Manager version Popup Exchange Server Administration 5
B Outlook 2010 popup "A custom form can not be opened. Outlook will use an Outlook form instead. The Using Outlook 2
Similar threads


















































Top