A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

VBA Scripts Do Not Show Up As "Custom Actions"



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old April 26th 06, 02:37 PM posted to microsoft.public.outlook.program_vba
[email protected]
external usenet poster
 
Posts: 10
Default VBA Scripts Do Not Show Up As "Custom Actions"

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/micro...47ecdedbf006fa

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

Thanks for any suggestions.

  #2  
Old April 26th 06, 04:37 PM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default VBA Scripts Do Not Show Up As "Custom Actions"

Wrong rule action. The rule action you want is "run a script" not "custom action."

--
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

wrote in message oups.com...
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/micro...47ecdedbf006fa

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

Thanks for any suggestions.

  #3  
Old April 26th 06, 05:01 PM posted to microsoft.public.outlook.program_vba
[email protected]
external usenet poster
 
Posts: 10
Default VBA Scripts Do Not Show Up As "Custom Actions"

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.

  #4  
Old April 26th 06, 05:43 PM posted to microsoft.public.outlook.program_vba
[email protected]
external usenet poster
 
Posts: 10
Default VBA Scripts Do Not Show Up As "Custom Actions"

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?

  #5  
Old April 26th 06, 09:29 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default VBA Scripts Do Not Show Up As "Custom Actions"

You would need an ItemAdd handler for every possible Items collection where
the routing could send the message.

--
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


wrote in message
oups.com...
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?


 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
"File As" reverts to "Last, First Middle" from custom Roshan Q Outlook - Using Contacts 0 April 7th 06 09:49 PM
Old-fashioned "trifold calender" printout needs "show next 30 day Adam Michael Barron, M.D. Outlook - Calandaring 0 March 31st 06 04:25 PM
when using a Excel csv file the show time "free" not "busy" greg Outlook - Calandaring 1 March 27th 06 05:24 AM
how to add a custom button on the explorer "standard" commandbar Herve cadieu Outlook and VBA 1 March 17th 06 03:33 PM
No "Reply action" on Actions tab lela2a Outlook - Using Forms 1 January 25th 06 09:50 PM


All times are GMT +1. The time now is 10:36 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.