Solved

Macro to prompt to add a cc address

Posted on 2006-11-15
9
497 Views
Last Modified: 2008-02-01
Here is what I would like to have happen in our Outlook 2000:
When the user clicks "send", Outlook will see if the word "programming" exists in the subject line of the outbound email.  If it does, Outlook will prompt the user "Send a copy (CC:) to programming@abc.com".
If the user clicks "yes", Outlook will then drop that email address in the CC field and send the message.
If the user clicks "no", Outlook will just send the message.

Can that be automated?
If yes, does that need to be done through a macro, a rule or both?

Thanks!
0
Comment
Question by:snyperj
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
9 Comments
 

Author Comment

by:snyperj
ID: 17946395
An afterthought would be this:
If Outlook could first look at the CC: field to see if it the prompt is necessary- that would be a bigger homerun.
Some users are very good about entering the address as a CC: on their own.  Some arent.  :-)
0
 
LVL 35

Accepted Solution

by:
mvidas earned 500 total points
ID: 17947355
Hi,

You would have to do this using a macro.  Go to the macro editor (alt-f11), and in the ThisOutlookSession object, paste the following in (assuming you don't already have an _ItemSend event):

Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
 If TypeName(Item) <> "MailItem" Then Exit Sub
 If InStr(1, Item.Subject, "programming", vbTextCompare) = 0 Then Exit Sub
 If InStr(1, Item.CC, "programming", vbTextCompare) > 0 Then Exit Sub
 Select Case MsgBox("Would you like to CC programming@abc.com?", vbYesNoCancel)
  Case vbCancel: Cancel = True
  Case vbYes: Item.CC = IIf(Len(Item.CC) > 0, Item.CC & "; ", "") & "programming@abc.com"
 End Select
End Sub

Matt
0
 

Author Comment

by:snyperj
ID: 17948152
Dang,  I was hoping there was someway around getting the "A program is trying to access email addresses you have stored in Outlook..." etc, etc.   by running the macro only if the CC field was blank, but not every time.

No option?

(We are unable to use redemption or ClickYes here due to company policy.)


0
Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

 
LVL 35

Expert Comment

by:mvidas
ID: 17948284
Are you able to install COM add-ins? There is one of those too that will do the same, and doesn't need to be started or anything. I can get the link if you can

But with later versions of outlook 2000, the security warning will pop up when the CC property gets accessed.  This is to prevent malicious code from reading the CC of a message, and sending spam out to any addresses in it.
0
 

Author Comment

by:snyperj
ID: 17948524
No - we priobably can't install those either (but do post the link please.)

Your explanation in the CC field makes sense I guess.  Bummer.

Thanks for the code.
0
 
LVL 35

Expert Comment

by:mvidas
ID: 17948587
The link for the addin is http://www.mapilab.com/outlook/security/
You may want to try it; the only way I could see your IT dept limiting it is just preventing you from downloading it.  Installing it can be done a couple ways (the easiest is Tools / Options / Other / Advanced Options / COM AddIns / Add)

Let me know if you need anything else!
Matt
0
 

Author Comment

by:snyperj
ID: 17948628
Thanks- I tried it.  I can download it OK, but because it is a setup.exe, when I run it I get pop-up login box to enter an administrator login which I of course don't have.
0
 
LVL 35

Expert Comment

by:mvidas
ID: 17948710
Hmm.. I have been vigilant in sticking with my outlook 2000 SR1 here at work, so I have no need for that addin, but I'll take a look at it later and see if it is just an executable archive or something.  If so (assuming no readme's exist preventing this, don't want to break any rules here) I'll see if I can post the .dll file itself for you.  I'm sure your IT dept would help if the need really existed; the addin doesnt do anything aside from make this routine a little more convenient.
I'll let you know if I have any luck with it
0
 

Author Comment

by:snyperj
ID: 17950535
Thanks.  It depends on who at IT here happens to get the request.  Some would help, some would stick to the book on policy.  No  uniformity- a whole different problem here.  Thanks for your help.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
Large Outlook files lead to various unwanted errors and corruption issues. Furthermore, large outlook files can also make Outlook take longer to start-up, search, navigate, and shut-down. So, In this article, i will discuss a method to make your Out…
CodeTwo Sync for iCloud (http://www.codetwo.com/sync-for-icloud?sts=6554) automatically synchronizes your Outlook 2016, 2013, 2010 or 2007 folders with iCloud folders available via iCloud Control Panel. This lets you automatically sync them with…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question