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

multiple macro/script in 1 outlook



 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old June 21st 06, 03:32 AM posted to microsoft.public.outlook.program_vba
ah
external usenet poster
 
Posts: 7
Default multiple macro/script in 1 outlook

Can I have more than 1 script running in 1 outlook mailbox?

I've created a script as follows previously:

Sub RunAScriptRuleRoutine(MyMail As MailItem)
Dim strID As String
Dim olNS As Outlook.NameSpace
Dim msg As Outlook.MailItem
Dim rpl As Outlook.MailItem

strID = MyMail.EntryID
Set olNS = Application.GetNamespace("MAPI")
Set msg = olNS.GetItemFromID(strID)
' do stuff with msg, e.g.
Set rpl = msg.Reply
rpl.Body = "testing" & vbCrLf & rpl.Body
rpl.Subject = "Authorization fail"
rpl.Send


Set msg = Nothing
Set olNS = Nothing
End Sub

Sub test()

End Sub

The above script should be run when the e-mail was sent by those
unauthorized personnel.

Now, I wish to run another script to generate an auto reply e-mail to the
authorized personnel with another message, for example: Thanks for your
e-mail etc. But, I found that I can only put in 1 script in the macro. Kindly
advice me on how to resolve this issue.

Thanks in advance
 




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
script/macro to send auto reply to sender ah Outlook and VBA 6 June 22nd 06 04:21 PM
Rule 'run a script' not running my script [email protected] Outlook and VBA 3 May 30th 06 12:09 PM
How do I create multiple VCards from Contacts, using a Macro? LA Outlook and VBA 0 May 22nd 06 07:35 PM
script the save of multiple attachments with the same name! sumGirl Outlook - General Queries 1 April 28th 06 10:03 AM
"Run a script" rule triggers but script does not execute Trey Shaffer Outlook and VBA 7 April 7th 06 11:34 PM


All times are GMT +1. The time now is 03:48 PM.


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.