Macro to display name of account receiving mail - vba

I have an Outlook application that contains multiple email accounts. On one of those accounts, I will occasionally receive emails where I am BCC'd, upon which I want to trigger a macro. I do not wish to trigger this macro when I am BCC'd otherwise, on any of the other accounts.
I am able to trigger a macro when I receive an email, but am unable to distinguish between mails that go to one account versus another.

Use MailItem.SendUsingAccount property. If it is null, you can assume it is the primary account (the first account in the Namespace.Accounts collection).

Related

Outlook 2021, how to write a trigger that change "From" field for speciffic account on every "Create Mail", "Reply", "Forward" event

In Outlook 20xx there is no way to change From field automatically. There are ways to have multiple accounts and use a default one all the time, but not when you reply. This is anti-feature by design and I'm forced to use Outlook with Exchage server using user emails (so every user has his own storage) but sending as office accounts (and when recieving email a copy is forwarded to users which are in office group) [eg. robert#company.com is real account, but when sending/reply/forward it should be sales#company.com]. There are many examples on using macros for all sort of things but not this one.
I need 3 triggers that change From field without clicking some special custom button
when I click New Email
when I click Reply on some selected email
when I click Forward on some selected email
thnx.
added exchange user account, then added exchange office account, set office account as default, options -> mail -> send messages -> always use default account when composing new messages
This was the nearest goal but worked only for new messages, on reply it allways default to user account.
The email profiles are Exchange profiles/accounts and have the required permissions to send on behalf of another person (eg. office#company.com)

Logging into and sending email automatically

I have an autoexec macro to send an email if a condition is met.
I would like this email to come from a specific email address no matter who opens the database.
I have the email account and password, but I'm not sure how to (or if it's even possible) to sign into an email account and send the email through VBA.
Solutions I've seen involve using .SendUsingAccount, however, that requires the user to be signed into the email account. Preferably, signing into the account would be done within the VBA so it doesn't matter if a user is logged into the account.
Use CDO and send via SMTP to the server of the mail account:
VBA – CDO Mail

How to send a request to my add in when a user changes the date of a meeting inside outlook (without opening the add-in)?

I'm building an Outlook Add-in where the user can book a meeting directly from outlook. The add in is basically a shortcut to the website we usually use, but instead we take the data from the outlook meeting (Date, title, etc..). The problem is that once the user has created a meeting and it has been saved in our database (and they close the add-in), the add-in can't detect if they change the meeting date, and therefore it doesn't get updated in the database.
Shortly put: Is there any way that my add-in can communicate with outlook and fire a function without being opened?

sharepoint registration change notification

I have a class registration set up in SharePoint 2013. Users are emailed when they register for a class. I want to create email notifications when the Start Date, Start Time or Location [fields] of the Session changes. I only want to email the users that have registered for said Session (between 1 and 400 people).
I should be able to handle this with an Alert or an Event, but can't figure it out. My SharePoint team is telling me that this is too difficult because "the columns are in Sessions [list] and not in Registrations [list view].
I've found a lot of information on general SharePoint alerts, but I can't find anything on sending notifications to a select group of users, based on another field.
You could create event receiver for the list and send email by SPUtility.SendEmail with dynamic users.
You could check sample code from here.
Create event receiver in SharePoint 2013.

Email Synching into Custom App

How have people intergrated custom CRM type applications with email?
I have a Access 2003 front-end application with a SQL Server 2005 backend. One CRM
part of the application tracks the activity with the customer in a traffic
log table. Sometimes the salesstaff has communication with their customer
using email instead. What do people do to synch this up with an application?
I was thinking about creating a form to enter the initial message, so I
could save it into a table and then have the system generate a email, of
course, this doesn't handle the email communication after the initial email.
Thanks
What you need to do is setup your domain name with a free google apps account. Your sales staff can still use the clients of their choice, but since they are essentially using custom gmail accounts, every single email that they send and receive will be recorded in a nice and neat transactional format in the gmail interface. Since your sales staff is always online, they will always have access to every message they ever sent. If you want to have access to the emails, you can set it up that every single message that gets sent are automatically blind forwarded to your account. Filters can be set up to automatically tag and archive them, so you will not be overwhelmed, but you will still be able to search them. Google Apps will also give you a central contact directory similar to outlook/exchange.
Here are a few options for you:
Use web forms for all communications. When a message is sent out, the only thing it includes is a link back to the site. Responses are sent the same way.
Setup an email alias that your sales staff Cc's when they want their correspondence to be tracked. Your app would periodically read a POP mailbox, and record the traffic. Customers would have to remember to Cc the same email box for the traffic to be remembered.
Establish a single common email box, such as sales#domain.com. All outgoing mail is marked as being from that account, so all replies will go through it. To send mail, sales staff uses a web form. Messages are tagged with a key that associates them with a particular customer. Putting the key in the subject header usually works OK (that's how many support ticket management systems work, for example). Replies from customers keep the tag. Your app then reads an associated POP mailbox, parses out the keys, and stores the email accordingly.