Run Outlook Macro when sending mail from Excel - excel

I have a VBA code in Thisoutlooksession that runs when new mail is sent.
But when I send a mail using Excel biltin option to send the file attached, the code in the outlook don't run.
Would appreciate youre help.
Thanks in advance.

This is a situation where some Outlook functionality is not applied.
"You use Send As or other Send commands from another Microsoft Office application, such as Microsoft Word, Microsoft Excel, or Microsoft PowerPoint. This scenario typically occurs when you use a command to send the current file as an attachment." Messages that are created outside Outlook do not include the default Outlook email signature
"If you need all features to be available, you either need to create the email from Outlook itself or create the new email programmatically from within that other application as well." Outlook UserForms dont work when emailing from another application
"This is by design: messages created and sent by Simple MAPI or mailto url do not trigger OOM events. This is done on purpose - there were some problems in those scenarios, so events were completely disabled." ItemSend event is not firing

Related

VBA Outlook Gmail sent item marked as spam. Sending from browser goes fine

We send lot of mails with invoices in PDF format to our Clients. We have automated this with simple Outlook VBA code in this page:
Outlook VBA to send mail with Attachment
The mail contains only a PDF attachment & few words in content with hyperlink to our website in signature.
Problem:
If we send the mail through Outlook VBA, the receiving side of mail shows this message.
But, instead of sending, If we save this mail in draft through VBA, then sync with Gmail, Open Chrome -> Gmail -> Drafts -> click send manually. The mails does not show the warning at reciever end.
Note: Settings in our domain like DKIM and SPF are set fine
We appreciate any of your ideas or hints to avoid this problem.
Outlook doesn't differentiate emails submitted manually or programmatically.
The following articles can help you to understand the cause why your email is marked as spam on the receiver's side:
How to Stop Your Emails From Going to Spam – 10 Tips
12 Reasons Why Your Emails Go in the Spam Box (and How to Make Sure They Don’t)

Acumatica - Outlook PlugIn Reply Action

we are using Acumatica outlook plugin to create CASES and we are successful in achieving it.
As you know outlook plugin will automatically create a email activity when we create case. So sometimes we send reply from Outlook plugin and some times we send reply from Acumatica.
The issue is - When we send reply from outlook plugin we are unable to see email in "All Emails" screen, but if we are sending reply to same case from Acumatica we are able to see email in "All Emails" screen.
Can someone please suggest us, what we are missing here.
We are in 2019R2, without any customization published.
There could be a couple of reasons you may be running into this problem. Depending on how you have your setup, one reason could be because of the way you have your System Email Account set up. Check what email is sending as, it could be sending a centralized account. Also check what you default email is set on your account.
Also, are you using the Outgoing Tab? Or looking looking at the all records tab? It could be because of the status of your email. When sending through the Outlook plugin, double check the emails are sending, and double check the status of the activity. It could not be completing and being left as an open item.

Outlook on Send via Office 365

I am a bit confused on the Outlook on Send feature. Is it supported with hosted Office365 with Windows Desktop client.
If not what other way is there to have the system make a call to my back end to have some validation done ? Currently my users have to click in my plugin to validate and then send the send bttn of the mail client. Ideally i would like to intercept the send request, make my call to my backend and once validated return the transformed email and send it.
Can i go and trigger a send request from my plugin or is the only way to go and use the graph interface to send the message ? I rather not do that if possible as i will have to handle attachments and images as well.
The "on send" feature is only currently available for Outlook Online, not for Outlook for Windows or Mac. However, it will do exactly what you need to do in terms of validating the email and allowing or blocking the send. The only other integration option is a COM add-in, which will allow you to intercept either the active email's send event or all send events in the application.

Modify message with an Outlook web add-in (when reading email, not composing)

I'm trying to establish if this is even possible:
Can an outlook web add-in (i.e. a JavaScript add-in that works on the web and in outlook, not a COM based add-in) modify the body of an email while in read mode (i.e. the user is reading an email, not composing a new email or replying to an email).
What I need to do is trigger the add-in if the email contains hyperlinks (looks like I can do that with a contextual add-in using a regular expression) and then modify those hyperlinks (change the href or add an onClick event handler) so if the user clicks them the behaviour is different.
Based on #OutlookAdd-insTeam-MSFT comment I'll post my own answer:
You cannot modify the body of an email in read mode.
:(
Cant comment. Not enough rep.
I am looking at the documentation for Read Scenario I dont see anything related to set property.
However I do see something about extracting info from an item, more importantly extracting URL's
May be you can extact URL's do your modifications and with the new content you can create a New message item or even Reply and Reply all
It should be able to do that using calling UpdateItem via EWS from the add-in, right? See https://learn.microsoft.com/en-us/exchange/client-developer/web-service-reference/updateitem-operation
Why wouldn't that work #microsoft?

Excel Auto Send Emails via Outlook Randomly NOT Sending

I've inherited development of an Excel userform which contains a send button to return the user's data back to a central mailbox. The tool has just been rolled out to a larger community and some users are experiencing emails not being sent. These are random events as the users can sometimes send the forms and it is not form specific.
The tool uses the following code to create the email:
Set ObjOL = CreateObject("Outlook.Application")
Set ObjOutMail = ObjOL.CreateItem(0)
and is sent via:
ObjOutMail.send
We had tested this with a number of users and never had any problems, but we now have a number of users who have successfully sent 1 or more forms but 1 or more have also failed, and they also can't resend the successful forms any more either.
There are no error messages, the Outlook "this could be a virus, etc." confirmation is fired as usual (we have not attempted to circumvent this) but there is nothing in the 'Sent Items'. The users are also able to send conventionally generated emails so there is no mailbox limitations going on.
The Userform is modal and upon sending copies the three user fields to "Sheet1", saves itself and mails itself.
Really at a loss to understand what's going on.
Thanks for any advice.
EDIT: To add we are still using Office 2003 on Win XP.
Thanks for all the replies, using the .display property showed me what was up.
The email is addressed to what I thought was an explicit address, however there is an extra '(MULTIUSER)' post fix which I didn;t realise was actually part of the address, DOH!.
Last week and similar mailbox made up of the same address but with a different postfix was added to the system. This ment Outlook couldn't resolve the address and didn't send the emails.
Thanks again.

Resources