UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Outlook And Auto Population, Office 2013    
 
   
EllenMarie
post Jun 13 2018, 09:52 AM
Post#1



Posts: 200
Joined: 4-August 10



I am not sure where I should post this, but I have an Outlook question pertaining to automation. I want to know if there is a way of auto-populating the To and Cc lines with recipients into a new email message via VBA and running the VBA from a custom button in Outlook. So, to explain further what I need, I am creating a new email message from scratch (manually, no programming involved) the way it’s usually done. However, I want to have the To and Cc lines of the email programmatically populated with email addresses via a macro.


I should emphasize, there are tons of examples of automating the creation of a new email message and adding recipients to the To and Cc which I already do all of the time. However, I need a way of creating an email the way most people create a new message but automate the second piece (adding recipients to the To and Cc line).
Go to the top of the page
 
theDBguy
post Jun 13 2018, 10:09 AM
Post#2


Access Wiki and Forums Moderator
Posts: 72,396
Joined: 19-June 07
From: SunnySandyEggo


Hi,

Where would the information to populate the To and CC fields come from? Would they be the same each time an email is created through this button? If so, and I am not sure if this is applicable but, have you tried creating an email template? If you can prepopulate those fields in a template, then maybe you can add a button on the Ribbon to use the template or instruct the users to use New Items > E-mail message Using > Template Name (I think).

Just my 2 cents...

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Microsoft Access MVP | Access Website | Access Blog | Email
Go to the top of the page
 
EllenMarie
post Jun 13 2018, 12:08 PM
Post#3



Posts: 200
Joined: 4-August 10



Thanks for your response, DB guy. I wanted to keep it simple so I deliberately omitted some details. I'll be receiving emails that need to be forwarded. I'd like the emails to be auto-populated with selected recipients.
Ellen
Go to the top of the page
 
theDBguy
post Jun 13 2018, 12:24 PM
Post#4


Access Wiki and Forums Moderator
Posts: 72,396
Joined: 19-June 07
From: SunnySandyEggo


Hi Ellen,

Right, but when you say "selected users," are you saying the selection is pre-made/decided and will be consistent? Or are you saying the user will "select" these users. If pre-selected, then I am hoping a template email will allow you to pre-populate those fields so each time the template is used, then the To and CC are automatically pre-populated.

Just a thought...

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Microsoft Access MVP | Access Website | Access Blog | Email
Go to the top of the page
 
EllenMarie
post Jun 13 2018, 12:32 PM
Post#5



Posts: 200
Joined: 4-August 10



I will select the recipients. So the template wouldn't work in that case.
Go to the top of the page
 
theDBguy
post Jun 13 2018, 12:45 PM
Post#6


Access Wiki and Forums Moderator
Posts: 72,396
Joined: 19-June 07
From: SunnySandyEggo


Hi Ellen,

Sorry for my confusion. You said you want the email to be auto-populated with selected recipients, which you are now saying you will be the one making the selection. So, the last question I have is "when" will you make this selection? At the time when you click the button to create the email? Or, at the time you create the code for the button? If the latter, are you sure a template won't work? Like I said, I haven't tried creating a template, but I am hoping you at least have. Is this correct? Thanks for clarifying and being patient with me.

Cheers!

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Microsoft Access MVP | Access Website | Access Blog | Email
Go to the top of the page
 
theDBguy
post Jun 13 2018, 12:51 PM
Post#7


Access Wiki and Forums Moderator
Posts: 72,396
Joined: 19-June 07
From: SunnySandyEggo


According to this article, Outlook Email Templates can have pre-populated Recipients fields.

Hope it helps...

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Microsoft Access MVP | Access Website | Access Blog | Email
Go to the top of the page
 
EllenMarie
post Jun 14 2018, 05:59 AM
Post#8



Posts: 200
Joined: 4-August 10



Thanks, DB Guy. I found the answer. Adding recipients can indeed be done programmatically to a opened email. I had to change my google search terms to pull up this link below.
https://stackoverflow.com/questions/1547698...rent-open-email
Ellen :-)
Go to the top of the page
 
theDBguy
post Jun 14 2018, 10:02 AM
Post#9


Access Wiki and Forums Moderator
Posts: 72,396
Joined: 19-June 07
From: SunnySandyEggo


Hi Ellen,

Congratulations! Glad to hear you found a solution. Good luck with your project.

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Microsoft Access MVP | Access Website | Access Blog | Email
Go to the top of the page
 


Custom Search
RSSSearch   Top   Lo-Fi    19th June 2018 - 08:54 PM