Trying to draft custom email body in outlook from excel spreadsheet - excel

I'm trying to learn how to use Excel/VBA to automate as much of the below workflow as I can:
I receive an email from a manager notifying me that an employee has Covid. This initial notification is not standardized
I manually enter the information (employee name, their state, company, test date, test results, etc) into a spreadsheet. Sometimes certain cells information are left blank if they are not provided in #1
I REPLY ALL to original email. I use a template and edit based on the information I've entered into the spreadsheet (for instance, certain states have different guidelines) and attach PDFs depending on the company. I may also ask for missing information
My goal is to:
Be able to press a button in excel to draft an email body with information I've entered into spreadsheet. A combination of "mad lib" and "if this then that". If specific cells are blank, Id want the email to include what information i still need. I only send this specific email once, but I have to do it again every time there is a new Covid case.
My restrictions are:
Multiple people use this same workflow and spreadsheet, so ideally it would be simple for coworkers. I do not want excel to automatically send the email without the user reviewing it first.
I am very new to VBA, but am learning Python.
I cannot download anything on my work computer.
Thank you so much!

Related

Search email in Outlook for Customer ID, forward email to email address in database

Sorry, complete noob here... we have a client that has a list in Excel of 1,500 customers with their Customer ID and their email address.
As an invoice email comes into a mailbox they want a way to search the email body for the Customer ID and then forward to the email address in the Excel spreadsheet.
It doesn't have to be Excel, but it has to be simple enough for an end user to add to the list in the future.
Can this be done with VBA to search a database from Outlook, or do I need to look at a third party program? If the latter, can anyone recommend one?
Yes, it is possible to implement such things according to your needs. You can create a VBA macro or develop a COM add-in if you need to distribute the solution on multiple machines. In case of VBA the starting point is to get familiar with the environment, see Getting started with VBA in Office.
You need to start from handling incoming emails, so the Application.NewMailEx can be helpful in that case. This event fires once for every received item that is processed by Microsoft Outlook. The item can be one of several different item types, for example, MailItem, MeetingItem, or SharingItem. The NewMailEx event fires when a new message arrives in the Inbox and before client rule processing occurs. The EntryIDsCollection string contains the Entry ID that corresponds to that item. Use the Entry ID to call the NameSpace.GetItemFromID method and process the item.

How can I use a VBA macro on an excel form (used by multiple people) to send a completed form as a PDF attachment from dynamic Gmail accounts

I have created a form for the use of our less tech-savvy field supervisors. It is a form that they have to manually fax us and it usually arrives much later than what we need in the administrative office that I work at. I was wanting to use this new excel form to assist them with effectively completing the form and using a single button command to create a new PDF and Excel file with a dynamic name (based on sheet name) and to automatically send it as an email through their company gmail account.
I have successfully managed to create the dynamic sheet name and creation of the PDF and new Excel document, but I cannot seem to find a way to use gmail as a way to email said PDF. The only sources I can find regarding it seem to limit it to one specific email address that can be used to send it. I need to find a way to have it be dynamic since we have dozens of different people that would use this form.

How can I create a connection/link between Excel and an Outlook email?

I've been sending Outlook emails from Excel for a while, using it to manage my sales and project management activities at work. I've been enjoying increased productivity from it, so I want to do some more advanced things. For example, I think I have the code worked out, probably in a crude way, to have Excel help keep track of emails that have not been replied to. (I simply have Outlook, for each new email, open a workbook, and create a record in a new row, then have Excel attempt to match it to an email I previously sent.)
But once I have a record in Excel of such an email, it has no link or connection to the actual email. I want to be able to click on the Excel icon or link for the email, and then pull up the actual email.
I have found possibilities in using EntryIDs and MessageIDs, Outlook URLs and GUIDs,and even good-old AdvancedSearch (but I think having Excel search for an email that it initiated seems pretty clunky; there should be a way to create a hard link to the email).
Relatedly, and also probably just as clunky, but I've pondered "embedding" a unique identifier in each Excel-initiated email, that could be used to find it and link it back to a record in Excel. In an HTML email, I can add a string of numbers under my signature, in white text on a white background, and it's not perfect but in most cases should go unnoticed, and would allow my spreadsheet to positively identify it (as a reply to a particular email, etc.)
I know we're not supposed to ask for "advice" but I am hoping someone can point me in the right direction to something that may work for what I hope to accomplish.
Why not use the email's time sent (TIMESTAMP - MMDDYYYYHHSS), Recipient, and Subject Line as unique, identifying markers? Add these fields to your row data. Then, after email is sent, create a macro event that will:
Launch the Outlook App
Open the Sent Folder
Loop through all items
Filter email to the markers (Time, Recipient, Subject Line) of the active Excel row
Open the Email Item
Aside, my personal advice is to use a database like MS Access which works great with its siblings, Excel and Outlook. Also, it is designed to maintain relationships between data elements. Access could hold all the needed email content (emailID, recipient, subject, body, date, emailsent?) and with forms can provide AfterUpdate, ButtonClick, OnOpen events to manage the process of data entry, email process, data update, so on. If only you knew the increased productivity that comes with a relational database!
You can add a user property to the MailItem class. See the UserProperties collection for more information.
The automated systems add an ID to the end if the Subject line.

How to send email at specied time and date in crm 2011

after selecting lead and if Email button from ribbon is selected , then email form opens , here is it possible to set time and date for email to be send.
i tried "Actual start , Actual end , Due date etc" but mails sends immediatly after send button is pressed.
Is there any other ways to set Date and time for sending email.
Thanks in Advance.
I don't think there is a great out of the box solution for what you are looking for. However, depending on which version of CRM you are using (online vs on premise) You can create workflow that will fire off of one of those date fields being set (or a custom one) and wait until that specified time. To actually send it you will have create a workflow assembly (on prem only at this time I believe) to send that e-mail record out.
If it is online or you want to not add any code you can still do this trick. There are some drawbacks such as the e-mail would be text only, not able to recreate the activity party lists and some other things. Here is what I would do.
Create a new entity called Scheduled E-mail
Create all of the e-mail fields that you need to recreate as well as a date field to send the e-mail out by.
Create the workflow on the Scheduled E-mail entity to wait until the specified date.
After the step use the "Send E-mail" step to send the e-mail and copy over all of the fields you need.
This isn't a perfect solution, but will work with no code.
Hope this helps!

populate google spreadsheet based upon email text (not form)

I will like to populate a spreadsheet in a google spreadsheet based upon text in received emails. For instance, if a particular text appears in an email, value of a "counter" should increase. Is such a functionality possible?
You could probably achieve this using Google Apps Scripts.
1 - To get data from Gmail into a spreadsheet: the GmailApp class
2 - To set up a spreadsheet with triggers: Understanding Events
Then, using (2), set up a spreadsheet that either periodically, or every time it is opened, executes code using (1) that parses Gmail messages and writes to the spreadsheet. The following would be a good place to start:
3 - Tutorial: Creating Gmail Inbox Statistics Report

Resources