![]() |
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. |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
![]()
I'm using Outlook 2003. I purchased an Outlook VBA book, and it shows
examples of using the rules wizard "run a script". I do not see this option when I go into rules, and I would really like to use it. Any suggestions? Thanks, in advance, for your help. |
#2
|
|||
|
|||
![]()
In Rules and Alerts click New Rule
Click 'Start From A Blank Rule' and choose a Step 1 option. Click Next Select one or more conditions and click 'Next' Under Select Action you should see an option for 'Run A Script', check it and click on the 'a script' hyperlink in the bottom window. Choose the script that you wish to run. Continue the remainder of the wizard. -- Alan Moseley IT Consultancy http://www.amitc.co.uk If I have solved your problem, please click Yes below. Thanks. "laavista" wrote: I'm using Outlook 2003. I purchased an Outlook VBA book, and it shows examples of using the rules wizard "run a script". I do not see this option when I go into rules, and I would really like to use it. Any suggestions? Thanks, in advance, for your help. |
#3
|
|||
|
|||
![]()
I went through the steps you outlined multiple times, and there's no "run a
script" rule. I wonder if my company "turned off" this option? I was hoping to use this as the VBA procedure I wrote results in the Outlook Security Warning and is useless because of the warnings (my user would have to click 'yes' 400+ times a month). I thought by using the RunAScript rule it may prevent the warnings. Thanks for responding. "Alan Moseley" wrote: In Rules and Alerts click New Rule Click 'Start From A Blank Rule' and choose a Step 1 option. Click Next Select one or more conditions and click 'Next' Under Select Action you should see an option for 'Run A Script', check it and click on the 'a script' hyperlink in the bottom window. Choose the script that you wish to run. Continue the remainder of the wizard. -- Alan Moseley IT Consultancy http://www.amitc.co.uk If I have solved your problem, please click Yes below. Thanks. "laavista" wrote: I'm using Outlook 2003. I purchased an Outlook VBA book, and it shows examples of using the rules wizard "run a script". I do not see this option when I go into rules, and I would really like to use it. Any suggestions? Thanks, in advance, for your help. |
#4
|
|||
|
|||
![]()
Are you trying to create a rule for outgoing messages? The "run a script"
action is available only for incoming messages. If you're getting security prompts with normal Outlook VBA code, using the "run a script" rule isn't necessarily going to get around that. Maybe your VBA code simply isn't constructed properly to derive all objects from the intrinsic Application object. You might also want to tell us the security state shown on the Help | About Microsoft Outlook dialog. -- Sue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "laavista" wrote in message ... I went through the steps you outlined multiple times, and there's no "run a script" rule. I wonder if my company "turned off" this option? I was hoping to use this as the VBA procedure I wrote results in the Outlook Security Warning and is useless because of the warnings (my user would have to click 'yes' 400+ times a month). I thought by using the RunAScript rule it may prevent the warnings. "Alan Moseley" wrote: In Rules and Alerts click New Rule Click 'Start From A Blank Rule' and choose a Step 1 option. Click Next Select one or more conditions and click 'Next' Under Select Action you should see an option for 'Run A Script', check it and click on the 'a script' hyperlink in the bottom window. Choose the script that you wish to run. Continue the remainder of the wizard. "laavista" wrote: I'm using Outlook 2003. I purchased an Outlook VBA book, and it shows examples of using the rules wizard "run a script". I do not see this option when I go into rules, and I would really like to use it. |
#5
|
|||
|
|||
![]()
Did you check your security state yet? If it says "administrator
controlled," that means that the Exchange administrator is controlling security and, unless they loosen it for you, you won't be able to run VBA code without security prompts. -- Sue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "Sue Mosher [MVP]" wrote in message ... Are you trying to create a rule for outgoing messages? The "run a script" action is available only for incoming messages. If you're getting security prompts with normal Outlook VBA code, using the "run a script" rule isn't necessarily going to get around that. Maybe your VBA code simply isn't constructed properly to derive all objects from the intrinsic Application object. You might also want to tell us the security state shown on the Help | About Microsoft Outlook dialog. "laavista" wrote in message ... I went through the steps you outlined multiple times, and there's no "run a script" rule. I wonder if my company "turned off" this option? I was hoping to use this as the VBA procedure I wrote results in the Outlook Security Warning and is useless because of the warnings (my user would have to click 'yes' 400+ times a month). I thought by using the RunAScript rule it may prevent the warnings. "Alan Moseley" wrote: In Rules and Alerts click New Rule Click 'Start From A Blank Rule' and choose a Step 1 option. Click Next Select one or more conditions and click 'Next' Under Select Action you should see an option for 'Run A Script', check it and click on the 'a script' hyperlink in the bottom window. Choose the script that you wish to run. Continue the remainder of the wizard. "laavista" wrote: I'm using Outlook 2003. I purchased an Outlook VBA book, and it shows examples of using the rules wizard "run a script". I do not see this option when I go into rules, and I would really like to use it. |
#6
|
|||
|
|||
![]()
If your script is written within Outlook VBA then it should be possible to
write your code so that the warnings do not appear. Do you have any lines of code similar to:- Set objOutlook = New Outlook.Application or Set objOutlook = CreateObject("Outlook.Application") If so then try changing this to:- Set objOutlook=Outlook If you then create further objects from this, such as:- Set objNamespace = Outlook.GetNameSpace("MAPI") Set objContacts = objNamespace.GetDefaultFolder(olFolderContacts).It ems and so on, you will prevent the security warning from being shown as 'Outlook' is an in-built object that picks up a reference to the currently running Outlook application. If you need any further assistance then post your code and I will see what needs changing. -- Alan Moseley IT Consultancy http://www.amitc.co.uk If I have solved your problem, please click Yes below. Thanks. "laavista" wrote: I went through the steps you outlined multiple times, and there's no "run a script" rule. I wonder if my company "turned off" this option? I was hoping to use this as the VBA procedure I wrote results in the Outlook Security Warning and is useless because of the warnings (my user would have to click 'yes' 400+ times a month). I thought by using the RunAScript rule it may prevent the warnings. Thanks for responding. "Alan Moseley" wrote: In Rules and Alerts click New Rule Click 'Start From A Blank Rule' and choose a Step 1 option. Click Next Select one or more conditions and click 'Next' Under Select Action you should see an option for 'Run A Script', check it and click on the 'a script' hyperlink in the bottom window. Choose the script that you wish to run. Continue the remainder of the wizard. -- Alan Moseley IT Consultancy http://www.amitc.co.uk If I have solved your problem, please click Yes below. Thanks. "laavista" wrote: I'm using Outlook 2003. I purchased an Outlook VBA book, and it shows examples of using the rules wizard "run a script". I do not see this option when I go into rules, and I would really like to use it. Any suggestions? Thanks, in advance, for your help. |
#7
|
|||
|
|||
![]()
Alan, you do not know how much I appreciate you looking at my code to see if
the security warnings can be eliminated. I REALLY need to get this working and have spent hours (and hours) trying things, researching, and trying more things, with no luck. THANK YOU. The reason I need this-- I have several users who send 400+ emails a month to customers with attachments. In order for their billing reconciliation to match, they have to remember to send a copy of these emails WITHOUT the attachments to the billing personnel who runs a reconciliation procedure to match emails sent to customers against a database. If the user forgets to send the email (they reply with different addressees so the attachments are not sent), then it causes a reconciliation check, an email has to be sent to the user asking for a copy of the email, the user has to send it and someone tracks that it's received. My intent: after the user sends the email to their customer, the rules wizard would automatically move the sent email (based on words in the subject) to a folder, then the sub procedure would run sending a reply to the appropriate billing people. My code: CODE IS IN “THISOUTLOOK SESSION” Option Explicit Dim WithEvents ReplyToItItems As Items Private Sub Application_Startup() Dim ns As Outlook.NameSpace Set ns = Application.GetNamespace("MAPI") Set ReplyToItItems = ns.Folders.Item("Personal Folders").Folders.Item("test").Items End Sub Sub ReplyToItItems_ItemAdd(ByVal Item As Object) ' when a new item is added to "test folder" it is processed Dim myReply As MailItem Set myReply = Item.Reply With myReply .To = " .Send End With End Sub Private Sub application_quit() Dim ns As Outlook.NameSpace Set ReplyToItItems = Nothing Set ns = Nothing End Sub ======= "Alan Moseley" wrote: If your script is written within Outlook VBA then it should be possible to write your code so that the warnings do not appear. Do you have any lines of code similar to:- Set objOutlook = New Outlook.Application or Set objOutlook = CreateObject("Outlook.Application") If so then try changing this to:- Set objOutlook=Outlook If you then create further objects from this, such as:- Set objNamespace = Outlook.GetNameSpace("MAPI") Set objContacts = objNamespace.GetDefaultFolder(olFolderContacts).It ems and so on, you will prevent the security warning from being shown as 'Outlook' is an in-built object that picks up a reference to the currently running Outlook application. If you need any further assistance then post your code and I will see what needs changing. -- Alan Moseley IT Consultancy http://www.amitc.co.uk If I have solved your problem, please click Yes below. Thanks. "laavista" wrote: I went through the steps you outlined multiple times, and there's no "run a script" rule. I wonder if my company "turned off" this option? I was hoping to use this as the VBA procedure I wrote results in the Outlook Security Warning and is useless because of the warnings (my user would have to click 'yes' 400+ times a month). I thought by using the RunAScript rule it may prevent the warnings. Thanks for responding. "Alan Moseley" wrote: In Rules and Alerts click New Rule Click 'Start From A Blank Rule' and choose a Step 1 option. Click Next Select one or more conditions and click 'Next' Under Select Action you should see an option for 'Run A Script', check it and click on the 'a script' hyperlink in the bottom window. Choose the script that you wish to run. Continue the remainder of the wizard. -- Alan Moseley IT Consultancy http://www.amitc.co.uk If I have solved your problem, please click Yes below. Thanks. "laavista" wrote: I'm using Outlook 2003. I purchased an Outlook VBA book, and it shows examples of using the rules wizard "run a script". I do not see this option when I go into rules, and I would really like to use it. Any suggestions? Thanks, in advance, for your help. |
#8
|
|||
|
|||
![]()
Your code works perfectly on my stand-alone Outlook. I fear therefore that,
as Ms Mosher has already suggested, that the Outlook security has been tightened up by your administrators. Do you have to email this reply to the billing people? If you are running Exchange server, could the email be copied to a public folder perhaps? This shouldn't trigger the security prompts. Your code could be easily modified to do this. Failing that, if you have Visual Studio, could you convert this code to run via an Outlook Addin? -- Alan Moseley IT Consultancy http://www.amitc.co.uk If I have solved your problem, please click Yes below. Thanks. "laavista" wrote: Alan, you do not know how much I appreciate you looking at my code to see if the security warnings can be eliminated. I REALLY need to get this working and have spent hours (and hours) trying things, researching, and trying more things, with no luck. THANK YOU. The reason I need this-- I have several users who send 400+ emails a month to customers with attachments. In order for their billing reconciliation to match, they have to remember to send a copy of these emails WITHOUT the attachments to the billing personnel who runs a reconciliation procedure to match emails sent to customers against a database. If the user forgets to send the email (they reply with different addressees so the attachments are not sent), then it causes a reconciliation check, an email has to be sent to the user asking for a copy of the email, the user has to send it and someone tracks that it's received. My intent: after the user sends the email to their customer, the rules wizard would automatically move the sent email (based on words in the subject) to a folder, then the sub procedure would run sending a reply to the appropriate billing people. My code: CODE IS IN “THISOUTLOOK SESSION” Option Explicit Dim WithEvents ReplyToItItems As Items Private Sub Application_Startup() Dim ns As Outlook.NameSpace Set ns = Application.GetNamespace("MAPI") Set ReplyToItItems = ns.Folders.Item("Personal Folders").Folders.Item("test").Items End Sub Sub ReplyToItItems_ItemAdd(ByVal Item As Object) ' when a new item is added to "test folder" it is processed Dim myReply As MailItem Set myReply = Item.Reply With myReply .To = " .Send End With End Sub Private Sub application_quit() Dim ns As Outlook.NameSpace Set ReplyToItItems = Nothing Set ns = Nothing End Sub ======= "Alan Moseley" wrote: If your script is written within Outlook VBA then it should be possible to write your code so that the warnings do not appear. Do you have any lines of code similar to:- Set objOutlook = New Outlook.Application or Set objOutlook = CreateObject("Outlook.Application") If so then try changing this to:- Set objOutlook=Outlook If you then create further objects from this, such as:- Set objNamespace = Outlook.GetNameSpace("MAPI") Set objContacts = objNamespace.GetDefaultFolder(olFolderContacts).It ems and so on, you will prevent the security warning from being shown as 'Outlook' is an in-built object that picks up a reference to the currently running Outlook application. If you need any further assistance then post your code and I will see what needs changing. -- Alan Moseley IT Consultancy http://www.amitc.co.uk If I have solved your problem, please click Yes below. Thanks. "laavista" wrote: I went through the steps you outlined multiple times, and there's no "run a script" rule. I wonder if my company "turned off" this option? I was hoping to use this as the VBA procedure I wrote results in the Outlook Security Warning and is useless because of the warnings (my user would have to click 'yes' 400+ times a month). I thought by using the RunAScript rule it may prevent the warnings. Thanks for responding. "Alan Moseley" wrote: In Rules and Alerts click New Rule Click 'Start From A Blank Rule' and choose a Step 1 option. Click Next Select one or more conditions and click 'Next' Under Select Action you should see an option for 'Run A Script', check it and click on the 'a script' hyperlink in the bottom window. Choose the script that you wish to run. Continue the remainder of the wizard. -- Alan Moseley IT Consultancy http://www.amitc.co.uk If I have solved your problem, please click Yes below. Thanks. "laavista" wrote: I'm using Outlook 2003. I purchased an Outlook VBA book, and it shows examples of using the rules wizard "run a script". I do not see this option when I go into rules, and I would really like to use it. Any suggestions? Thanks, in advance, for your help. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Rules Wizard Script | Henry Stockbridge | Outlook and VBA | 2 | August 29th 08 08:01 PM |
"Run a Script" does not appear as an Action in the Rules Wizard | Bob Miller | Outlook - General Queries | 1 | November 4th 07 10:19 PM |
Fax numbers no longer listed in send fax wizard addresses. | Brian | Outlook - Using Contacts | 8 | July 30th 07 03:44 AM |
Help Running a script in Rules Wizard to save attachments | Murphybp2 | Outlook and VBA | 1 | May 1st 07 10:04 PM |
Custom Rule or Script for Rules Wizard | Rick | Outlook and VBA | 0 | April 13th 07 09:10 PM |