Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Outlook / Programming VBA / April 2006

Tip: Looking for answers? Try searching our database.

VBA Scripts Do Not Show Up As "Custom Actions"

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
ajkessel@gmail.com - 26 Apr 2006 14:37 GMT
I have a simple procedure in ThisOutlookSession:

Sub MarkRead_CustomAction(Item As Outlook.MailItem)
 Item.UnRead = False
 Item.Save
End Sub

When I create a rule and click on "custom action," my subroutine
MarkRead_CustomAction is not an option. In fact, there are no options.
Even if I save the VBA and close and reopen Outlook, I still don't have
any custom actions as options.

When I go to Tools-->Macros, I do get a "Security Warning" and I have
to select "Enable Macros." For Macros that need access to the Address
Book, I need to further click 'yes' (although the procedure above
obviously does not access the Address Book).  Even after "Enablinng
Macros," I still have no options in the "custom action" dialog.

Any ideas why this isn't working?

I first raised this issue in this thread:

http://groups.google.com/group/microsoft.public.outlook.program_vba/browse_threa
d/thread/3347ecdedbf006fa


But I did not find any solutions, so I thought I would raise it here as
a separate thread.

Thanks for any suggestions.
Sue Mosher [MVP-Outlook] - 26 Apr 2006 16:37 GMT
Wrong rule action. The rule action you want is "run a script" not "custom action."

Signature

Sue Mosher, Outlook MVP
  Author of Configuring Microsoft Outlook 2003
    http://www.turtleflock.com/olconfig/index.htm
  and Microsoft Outlook Programming - Jumpstart for
    Administrators, Power Users, and Developers
    http://www.outlookcode.com/jumpstart.aspx
 

>I have a simple procedure in ThisOutlookSession:
>
[quoted text clipped - 24 lines]
>
> Thanks for any suggestions.
ajkessel@gmail.com - 26 Apr 2006 17:01 GMT
Oh, I see the problem now. You can "run a script" for incoming email,
but not for outbound email. Is there any way around this limitation? It
doesn't make any sense to me.
ajkessel@gmail.com - 26 Apr 2006 17:43 GMT
Actually, I can almost do what I want by creating an _ItemAdd
procedure. It seems fairly straightforward to create an _ItemAdd
procedure for the Default Folder for Sent Items, but what I want to do
is create an _ItemAdd procedure for messages that are routed to a
different folder by an outbound rule. Is there any way to do that?
Ken Slovak - [MVP - Outlook] - 26 Apr 2006 21:29 GMT
You would need an ItemAdd handler for every possible Items collection where
the routing could send the message.

Signature

Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm

> Actually, I can almost do what I want by creating an _ItemAdd
> procedure. It seems fairly straightforward to create an _ItemAdd
> procedure for the Default Folder for Sent Items, but what I want to do
> is create an _ItemAdd procedure for messages that are routed to a
> different folder by an outbound rule. Is there any way to do that?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.