Before send criteria

Status
Not open for further replies.

VBA Noob

Member
Outlook version
Outlook 2007
Email Account
Exchange Server
Hi people,

I'm looking for a way to check before sending if an email has the word "attached" and if there is an attachment make sure it's an .xls extension. I found some code which kind of does this but it's only looking at general attachments and counts the auto signature.

VBA Noob
 

Forum Admin

Senior Member
So basically, you want to check for attachment keywords then check the attachments to see if any have xls extensions?
 

VBA Noob

Member
Outlook version
Outlook 2007
Email Account
Exchange Server
Correct. Should check for the key word in subject title and boby of text then check file extension is an excel format I guess either .xls or .xlsx

VBA Noob
 

Forum Admin

Senior Member
I'm not sure you can merge the macros - i'll have to take a look at them in the morning. (plus i asked some outlook developers for assistance - hopefully they will have a code sample.)
 

VBA Noob

Member
Outlook version
Outlook 2007
Email Account
Exchange Server
Hi Slipstick,

I think this works for me. I've managed to work out my Auto signature has a .png and .jpg attachement so use the below to work out how many of these items I've got e.g 2 and deduct from the
Code:
item.Attachments.Count
Code:
If item.Attachments.Count > 0 Then
   For i = 1 To item.Attachments.Count
       If item.Attachments(i).FileName Like "*PNG*" Or item.Attachments(i).FileName Like "*JPG*" Then
               Cnt = Cnt + 1
       End If
   Next i
VBA Noob
 
Status
Not open for further replies.
Thread starter Similar threads Forum Replies Date
PGSystemTester VBA To Change AppointmentItem.BusyStatus From MeetingItem Before Send Using Outlook 0
L check if send message appears in SendItems forder before moving Using Outlook 0
M I get the following error message when tryiong to send some emails.__'Relaying denied: You must check for new mail before sending mail.' Using Outlook 2
L Outlook 2010 deleting items before they reach my inbox on send/receive Using Outlook 3
C Outlook 2010 - Once I send an email message it will will sit in the Outbox for several hours before 'magically' be sent and then appear in t Using Outlook 1
T Outlook 2010 Setting to Prompt 'Send before Exiting'__ Using Outlook 2
O Create a custom contact form - questions before messing things up... Outlook VBA and Custom Forms 4
L unblocking attachments before sending Office 365 Advanced Protection Using Outlook 0
R Warn before sending message Outlook VBA and Custom Forms 4
W Outlook 2010 some sent items marked unread now (was Ok before) Using Outlook 0
M Auto expand Distribution List Before Sending Email Outlook VBA and Custom Forms 1
M Moving mail to another folder is much slower than before (Office365) Using Outlook 0
A Check for words in subject header before sending email Outlook VBA and Custom Forms 4
CWM030 Rules disappearing in OL 2016? ( Yes, I searched before posting) Using Outlook 7
U Outlook 2010 'freezes' before moving emails Using Outlook 2
S Mail filter recieved before the last 2 working days Using Outlook 1
copperberry How to display incomplete tasks due on or before 7 days from now Using Outlook 0
O Rules and Alerts for New Messages BEFORE sending Using Outlook 2
G Can't open .pst. Message could not access default folder (Outlook 2010 (.pst). Before that was backi Using Outlook 0
Diane Poremsky Select from a List of Subjects before Sending a Message New Slipstick.com Articles 0
Diane Poremsky Check Contacts before moving them to Hotmail Contacts folder New Slipstick.com Articles 0
Diane Poremsky Check for missing attachments before sending a message New Slipstick.com Articles 1
Diane Poremsky Warn before sending messages to the wrong email address New Slipstick.com Articles 1
J How to validate any email address before it is sent Using Outlook 2
K Problem with FreeBusy (before 1pm only) Outlook VBA and Custom Forms 7
Diane Poremsky Add Attachment Names to Message Before Sending New Slipstick.com Articles 0
Diane Poremsky Check Message Size Before Sending New Slipstick.com Articles 0
Diane Poremsky Add Secure to the Message Subject before Sending New Slipstick.com Articles 0
J Creating a URL from a message body excerpt before forwarding Using Outlook 2
F Recurring meeting with recurring prep. 2 days before Using Outlook 1
S Checking attachment is passward protected or not before sending the mail Using Outlook 1
D how to get inbox messages to appear before deleted file messages? Using Outlook 6
D verify contact before sending Using Outlook 7
N Eliminate the +1 before all numbers Using Outlook 1
C Is there a way to prompt a user before deleting an item? BCM (Business Contact Manager) 4
S Outlook to validate task form before sending Using Outlook 5
S Prompt to add for text to existing subject line before sending. Using Outlook 9
N Outlook should use address in address book before the address in Autocomplete Using Outlook 0
S Trying to have a prompt to ask for text to be added to subject before sending. Using Outlook 3
H Insert Specific Text before Subject for New mails and reply Using Outlook 3
R What to backup before removing Outlook 2010? Using Outlook 4
T Is there a way to apply a macro before a signature is applied in email? Using Outlook 1
B How do I get a warning before deleting e-mail messages? Using Outlook 2
E Why does a Mailboximportrequest queue for at least 10 minutes before starting the import? Exchange Server Administration 1
S Edge Transport 3rd party mail filter before Exchange 2010 Exchange Server Administration 5
T Have to type in login to OWA twice before able to login Using Outlook 17
H Outlook 2010 "The end date you entered is before the start date..." Using Outlook 7
I Prompt before sending contacts to Deleted Items folder Using Outlook 7
A Emails are Delayed by several hours before appearing in my inbox Using Outlook 4
R Sending a copy of a link adds garbage before the link Using Outlook 3
Similar threads


















































Top