Solved

Macro to prompt to add a cc address

Posted on 2006-11-15
9
492 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
  • 5
  • 4
9 Comments
 

Author Comment

by:snyperj
Comment Utility
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
Comment Utility
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
Comment Utility
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
 
LVL 35

Expert Comment

by:mvidas
Comment Utility
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
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 

Author Comment

by:snyperj
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Granting full access permission allows users to access mailboxes present in their database. By giving full access permission one can open and read the content of any mailbox but cannot send emails from that mailbox.
Following basic email etiquette rules will help you write a professional email and achieve a good, lasting impression with your contacts.
To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

743 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now