![]() |
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
|
|||
|
|||
![]()
outlook 2007
I currently have macro / code saved in 'this outlook session' I want to add a second, entirely separate code, I'm unsure if I 'insert' in the above vba window, at the end, or should be doing something else. My first macro, curtsy Sue M, is designed to open a window to save a sent msg to a folder. The second being a reminder if I forget to add an attachment to a msg T/Y |
Ads |
#2
|
|||
|
|||
![]()
If the new code is a macro -- that is, a Public subroutine with no
parameters -- you can write it in ThisOutlookSession or in a new code module that you insert. You may want to use separate code modules to organize macros that are for different purposes. However, if your new code is not a macro but an event handler, put it in ThisOutlookSession. -- Sue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "DL" wrote in message ... outlook 2007 I currently have macro / code saved in 'this outlook session' I want to add a second, entirely separate code, I'm unsure if I 'insert' in the above vba window, at the end, or should be doing something else. My first macro, curtsy Sue M, is designed to open a window to save a sent msg to a folder. The second being a reminder if I forget to add an attachment to a msg T/Y |
#3
|
|||
|
|||
![]()
Thanks;
I took the code from here, http://www.danevans.co.uk/vba/ Opened the vba outlook window, which was allready populated with 'this outlook session' Inserted a new Module and pasted the code, compiled, saved and returned to Outlook Later shutdown OL, restarted and tested. Whilst 'send to' triggers the new one doesnt T/Y PS I can happily get round vba in access, but in OL another story ![]() "Sue Mosher [MVP]" wrote in message ... If the new code is a macro -- that is, a Public subroutine with no parameters -- you can write it in ThisOutlookSession or in a new code module that you insert. You may want to use separate code modules to organize macros that are for different purposes. However, if your new code is not a macro but an event handler, put it in ThisOutlookSession. -- Sue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "DL" wrote in message ... outlook 2007 I currently have macro / code saved in 'this outlook session' I want to add a second, entirely separate code, I'm unsure if I 'insert' in the above vba window, at the end, or should be doing something else. My first macro, curtsy Sue M, is designed to open a window to save a sent msg to a folder. The second being a reminder if I forget to add an attachment to a msg T/Y |
#4
|
|||
|
|||
![]()
That code is an event handler, not a macro, and therefore, should go in the
ThisOutlookSession module. If you already have an Application_ItemSend event handler there, you'll need to combine the two procedures. -- Sue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "DL" wrote in message ... Thanks; I took the code from here, http://www.danevans.co.uk/vba/ Opened the vba outlook window, which was allready populated with 'this outlook session' Inserted a new Module and pasted the code, compiled, saved and returned to Outlook Later shutdown OL, restarted and tested. Whilst 'send to' triggers the new one doesnt T/Y PS I can happily get round vba in access, but in OL another story ![]() "Sue Mosher [MVP]" wrote in message ... If the new code is a macro -- that is, a Public subroutine with no parameters -- you can write it in ThisOutlookSession or in a new code module that you insert. You may want to use separate code modules to organize macros that are for different purposes. However, if your new code is not a macro but an event handler, put it in ThisOutlookSession. "DL" wrote in message ... outlook 2007 I currently have macro / code saved in 'this outlook session' I want to add a second, entirely separate code, I'm unsure if I 'insert' in the above vba window, at the end, or should be doing something else. My first macro, curtsy Sue M, is designed to open a window to save a sent msg to a folder. The second being a reminder if I forget to add an attachment to a msg T/Y |
#5
|
|||
|
|||
![]()
OK, removed the module, added the code, after the code from your End
Function Which when testing only triggered Send To folder & not trigger words, then I'm guessing the code should be within the _ItemSend Sub? (I was trying to work out how to step through the code, when testing, in order to see where I was going wrong) "Sue Mosher [MVP]" wrote in message ... That code is an event handler, not a macro, and therefore, should go in the ThisOutlookSession module. If you already have an Application_ItemSend event handler there, you'll need to combine the two procedures. -- Sue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "DL" wrote in message ... Thanks; I took the code from here, http://www.danevans.co.uk/vba/ Opened the vba outlook window, which was allready populated with 'this outlook session' Inserted a new Module and pasted the code, compiled, saved and returned to Outlook Later shutdown OL, restarted and tested. Whilst 'send to' triggers the new one doesnt T/Y PS I can happily get round vba in access, but in OL another story ![]() "Sue Mosher [MVP]" wrote in message ... If the new code is a macro -- that is, a Public subroutine with no parameters -- you can write it in ThisOutlookSession or in a new code module that you insert. You may want to use separate code modules to organize macros that are for different purposes. However, if your new code is not a macro but an event handler, put it in ThisOutlookSession. "DL" wrote in message ... outlook 2007 I currently have macro / code saved in 'this outlook session' I want to add a second, entirely separate code, I'm unsure if I 'insert' in the above vba window, at the end, or should be doing something else. My first macro, curtsy Sue M, is designed to open a window to save a sent msg to a folder. The second being a reminder if I forget to add an attachment to a msg T/Y |
#6
|
|||
|
|||
![]()
Yes, you should place any code that you want to process messages as they are
sent inside the Application_ItemSend event handler. To step through the code, first use F9 to set a breakpoint. Then, when code execution stops at that point, press F8 to execute each statement. -- Sue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "DL" wrote in message ... OK, removed the module, added the code, after the code from your End Function Which when testing only triggered Send To folder & not trigger words, then I'm guessing the code should be within the _ItemSend Sub? (I was trying to work out how to step through the code, when testing, in order to see where I was going wrong) "Sue Mosher [MVP]" wrote in message ... That code is an event handler, not a macro, and therefore, should go in the ThisOutlookSession module. If you already have an Application_ItemSend event handler there, you'll need to combine the two procedures. "DL" wrote in message ... Thanks; I took the code from here, http://www.danevans.co.uk/vba/ Opened the vba outlook window, which was allready populated with 'this outlook session' Inserted a new Module and pasted the code, compiled, saved and returned to Outlook Later shutdown OL, restarted and tested. Whilst 'send to' triggers the new one doesnt T/Y PS I can happily get round vba in access, but in OL another story ![]() "Sue Mosher [MVP]" wrote in message ... If the new code is a macro -- that is, a Public subroutine with no parameters -- you can write it in ThisOutlookSession or in a new code module that you insert. You may want to use separate code modules to organize macros that are for different purposes. However, if your new code is not a macro but an event handler, put it in ThisOutlookSession. "DL" wrote in message ... outlook 2007 I currently have macro / code saved in 'this outlook session' I want to add a second, entirely separate code, I'm unsure if I 'insert' in the above vba window, at the end, or should be doing something else. My first macro, curtsy Sue M, is designed to open a window to save a sent msg to a folder. The second being a reminder if I forget to add an attachment to a msg |
#7
|
|||
|
|||
![]()
OK, I'll have to work on that, maybe study some code samples, as I assume I
need to call that event to trigger the function, & I still cannot see quite the way forward. I'll get there just a little slow & its late T/Y "Sue Mosher [MVP]" wrote in message ... Yes, you should place any code that you want to process messages as they are sent inside the Application_ItemSend event handler. To step through the code, first use F9 to set a breakpoint. Then, when code execution stops at that point, press F8 to execute each statement. -- Sue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "DL" wrote in message ... OK, removed the module, added the code, after the code from your End Function Which when testing only triggered Send To folder & not trigger words, then I'm guessing the code should be within the _ItemSend Sub? (I was trying to work out how to step through the code, when testing, in order to see where I was going wrong) "Sue Mosher [MVP]" wrote in message ... That code is an event handler, not a macro, and therefore, should go in the ThisOutlookSession module. If you already have an Application_ItemSend event handler there, you'll need to combine the two procedures. "DL" wrote in message ... Thanks; I took the code from here, http://www.danevans.co.uk/vba/ Opened the vba outlook window, which was allready populated with 'this outlook session' Inserted a new Module and pasted the code, compiled, saved and returned to Outlook Later shutdown OL, restarted and tested. Whilst 'send to' triggers the new one doesnt T/Y PS I can happily get round vba in access, but in OL another story ![]() "Sue Mosher [MVP]" wrote in message ... If the new code is a macro -- that is, a Public subroutine with no parameters -- you can write it in ThisOutlookSession or in a new code module that you insert. You may want to use separate code modules to organize macros that are for different purposes. However, if your new code is not a macro but an event handler, put it in ThisOutlookSession. "DL" wrote in message ... outlook 2007 I currently have macro / code saved in 'this outlook session' I want to add a second, entirely separate code, I'm unsure if I 'insert' in the above vba window, at the end, or should be doing something else. My first macro, curtsy Sue M, is designed to open a window to save a sent msg to a folder. The second being a reminder if I forget to add an attachment to a msg |
#8
|
|||
|
|||
![]()
No, you don't "need to call that event." The event handler's code runs
automatically whenever a user sends an item. -- Sue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "DL" wrote in message ... OK, I'll have to work on that, maybe study some code samples, as I assume I need to call that event to trigger the function, & I still cannot see quite the way forward. I'll get there just a little slow & its late T/Y "Sue Mosher [MVP]" wrote in message ... Yes, you should place any code that you want to process messages as they are sent inside the Application_ItemSend event handler. To step through the code, first use F9 to set a breakpoint. Then, when code execution stops at that point, press F8 to execute each statement. "DL" wrote in message ... OK, removed the module, added the code, after the code from your End Function Which when testing only triggered Send To folder & not trigger words, then I'm guessing the code should be within the _ItemSend Sub? (I was trying to work out how to step through the code, when testing, in order to see where I was going wrong) "Sue Mosher [MVP]" wrote in message ... That code is an event handler, not a macro, and therefore, should go in the ThisOutlookSession module. If you already have an Application_ItemSend event handler there, you'll need to combine the two procedures. "DL" wrote in message ... Thanks; I took the code from here, http://www.danevans.co.uk/vba/ Opened the vba outlook window, which was allready populated with 'this outlook session' Inserted a new Module and pasted the code, compiled, saved and returned to Outlook Later shutdown OL, restarted and tested. Whilst 'send to' triggers the new one doesnt T/Y PS I can happily get round vba in access, but in OL another story ![]() "Sue Mosher [MVP]" wrote in message ... If the new code is a macro -- that is, a Public subroutine with no parameters -- you can write it in ThisOutlookSession or in a new code module that you insert. You may want to use separate code modules to organize macros that are for different purposes. However, if your new code is not a macro but an event handler, put it in ThisOutlookSession. "DL" wrote in message ... outlook 2007 I currently have macro / code saved in 'this outlook session' I want to add a second, entirely separate code, I'm unsure if I 'insert' in the above vba window, at the end, or should be doing something else. My first macro, curtsy Sue M, is designed to open a window to save a sent msg to a folder. The second being a reminder if I forget to add an attachment to a msg |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Set off VBA macro on email receipt then that macro accesses the emailcontent | [email protected] | Outlook and VBA | 3 | February 5th 09 01:14 AM |
OL 2003 crashes on macro (Alt-F8) or macro editor (Alt-F11) | mikewillnot | Outlook - General Queries | 0 | May 5th 08 04:42 PM |
Outlook macro abends but Word macro runs successfully | Jreue | Outlook and VBA | 0 | December 14th 06 12:55 AM |
Macro or VB macro | JMS | Outlook - General Queries | 1 | November 9th 06 12:50 AM |
Call macro stored in Excel workbook from Outlook's macro | Gvaram | Outlook and VBA | 5 | October 4th 06 07:26 AM |