[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Macro to prompt to add a cc address

Posted on 2006-11-15
9
Medium Priority
?
513 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
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 2000 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Mailbox Corruption is a nightmare every Exchange DBA wishes he never has. Recovering from it can be super-hectic if not entirely futile. And though techniques like the New-MailboxRepairRequest cmdlet have been designed to help with fixing minor corr…
I came across an unsolved Outlook issue and here is my solution.
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…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
Suggested Courses

830 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