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

New Macro / VBA



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old August 4th 09, 09:24 PM posted to microsoft.public.outlook.program_vba
DL[_2_]
external usenet poster
 
Posts: 874
Default New Macro / VBA

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  
Old August 4th 09, 09:49 PM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP][_3_]
external usenet poster
 
Posts: 465
Default New Macro / VBA

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  
Old August 5th 09, 09:22 AM posted to microsoft.public.outlook.program_vba
DL[_2_]
external usenet poster
 
Posts: 874
Default New Macro / VBA

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  
Old August 5th 09, 03:08 PM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP][_3_]
external usenet poster
 
Posts: 465
Default New Macro / VBA

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  
Old August 5th 09, 08:05 PM posted to microsoft.public.outlook.program_vba
DL[_2_]
external usenet poster
 
Posts: 874
Default New Macro / VBA

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  
Old August 5th 09, 09:52 PM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP][_3_]
external usenet poster
 
Posts: 465
Default New Macro / VBA

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  
Old August 6th 09, 12:51 AM posted to microsoft.public.outlook.program_vba
DL[_2_]
external usenet poster
 
Posts: 874
Default New Macro / VBA

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  
Old August 6th 09, 03:44 AM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP][_3_]
external usenet poster
 
Posts: 465
Default New Macro / VBA

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


All times are GMT +1. The time now is 09:11 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.