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

Tags: , , , , ,

Application_ItemSend doesn't trigger after I save the vba project





 
 
Thread Tools Display Modes
  #1  
Old May 26th 06, 12:14 AM posted to microsoft.public.outlook.program_vba
Rick
external usenet poster
 
Posts: 98
Default Application_ItemSend doesn't trigger after I save the vba project

When I put some code in a new outlook installation it worked. But the moment
I exit Outlook (it prompted to save the project) the Application_ItemSend
doesn't trigger anymore. The code is still there (Alt-F11). I have to
delete the vbaproject.otm, paste in the code (without saving it) in order for
it to work. But as soon as I exit Outlook (save the project or not), it
doesn't work again. Any idea? Thanks.
Ads
  #2  
Old May 26th 06, 12:29 AM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Application_ItemSend doesn't trigger after I save the vba project

You mean, as soon as you exit and restart Outlook, right? If so, then maybe Outlook isn't shutting down completely before you restart.

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

"Rick" wrote in message ...
When I put some code in a new outlook installation it worked. But the moment
I exit Outlook (it prompted to save the project) the Application_ItemSend
doesn't trigger anymore. The code is still there (Alt-F11). I have to
delete the vbaproject.otm, paste in the code (without saving it) in order for
it to work. But as soon as I exit Outlook (save the project or not), it
doesn't work again. Any idea? Thanks.

  #3  
Old May 26th 06, 12:57 AM posted to microsoft.public.outlook.program_vba
Rick
external usenet poster
 
Posts: 98
Default Application_ItemSend doesn't trigger after I save the vba proj

Hi, Sue,

No, I restarted the computer. Even power-down. I tried 3 computers here
and they have the exact behaviors. After I reboot and restart Outlook, I
"ALT-F11" and the code is there under "Project1 - Microsoft Office Outlook
Objects - ThisOutlookSession". I tried Outlook 2003 and the new Outlook
2007 beta and they all show the same behavior. The code was really simple:

Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
MsgBox "You forgot the Subject line."
Cancel = True
End Sub

Thanks.

"Sue Mosher [MVP-Outlook]" wrote:

You mean, as soon as you exit and restart Outlook, right? If so, then maybe Outlook isn't shutting down completely before you restart.

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

"Rick" wrote in message ...
When I put some code in a new outlook installation it worked. But the moment
I exit Outlook (it prompted to save the project) the Application_ItemSend
doesn't trigger anymore. The code is still there (Alt-F11). I have to
delete the vbaproject.otm, paste in the code (without saving it) in order for
it to work. But as soon as I exit Outlook (save the project or not), it
doesn't work again. Any idea? Thanks.


  #4  
Old May 26th 06, 12:59 AM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Application_ItemSend doesn't trigger after I save the vba proj

What is your macro security setting?

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

"Rick" wrote in message ...
Hi, Sue,

No, I restarted the computer. Even power-down. I tried 3 computers here
and they have the exact behaviors. After I reboot and restart Outlook, I
"ALT-F11" and the code is there under "Project1 - Microsoft Office Outlook
Objects - ThisOutlookSession". I tried Outlook 2003 and the new Outlook
2007 beta and they all show the same behavior. The code was really simple:

Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
MsgBox "You forgot the Subject line."
Cancel = True
End Sub

Thanks.

"Sue Mosher [MVP-Outlook]" wrote:

You mean, as soon as you exit and restart Outlook, right? If so, then maybe Outlook isn't shutting down completely before you restart.

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

"Rick" wrote in message ...
When I put some code in a new outlook installation it worked. But the moment
I exit Outlook (it prompted to save the project) the Application_ItemSend
doesn't trigger anymore. The code is still there (Alt-F11). I have to
delete the vbaproject.otm, paste in the code (without saving it) in order for
it to work. But as soon as I exit Outlook (save the project or not), it
doesn't work again. Any idea? Thanks.


  #5  
Old May 26th 06, 01:11 AM posted to microsoft.public.outlook.program_vba
Rick
external usenet poster
 
Posts: 98
Default Application_ItemSend doesn't trigger after I save the vba proj

I set it to high, medium, low. It didn't make any difference.

"Sue Mosher [MVP-Outlook]" wrote:

What is your macro security setting?

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

"Rick" wrote in message ...
Hi, Sue,

No, I restarted the computer. Even power-down. I tried 3 computers here
and they have the exact behaviors. After I reboot and restart Outlook, I
"ALT-F11" and the code is there under "Project1 - Microsoft Office Outlook
Objects - ThisOutlookSession". I tried Outlook 2003 and the new Outlook
2007 beta and they all show the same behavior. The code was really simple:

Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
MsgBox "You forgot the Subject line."
Cancel = True
End Sub

Thanks.

"Sue Mosher [MVP-Outlook]" wrote:

You mean, as soon as you exit and restart Outlook, right? If so, then maybe Outlook isn't shutting down completely before you restart.

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

"Rick" wrote in message ...
When I put some code in a new outlook installation it worked. But the moment
I exit Outlook (it prompted to save the project) the Application_ItemSend
doesn't trigger anymore. The code is still there (Alt-F11). I have to
delete the vbaproject.otm, paste in the code (without saving it) in order for
it to work. But as soon as I exit Outlook (save the project or not), it
doesn't work again. Any idea? Thanks.


  #6  
Old May 26th 06, 01:38 AM posted to microsoft.public.outlook.program_vba
Rick
external usenet poster
 
Posts: 98
Default Application_ItemSend doesn't trigger after I save the vba proj

I took back. I set it to medium, and it works now.
But the pop up window always shows in the back, not in the front. I tested
it in outlook 2007, which pops up in the front, but in outlook 2003 SP2, it
pops in the back. Any idea?

"Rick" wrote:

I set it to high, medium, low. It didn't make any difference.

"Sue Mosher [MVP-Outlook]" wrote:

What is your macro security setting?

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

"Rick" wrote in message ...
Hi, Sue,

No, I restarted the computer. Even power-down. I tried 3 computers here
and they have the exact behaviors. After I reboot and restart Outlook, I
"ALT-F11" and the code is there under "Project1 - Microsoft Office Outlook
Objects - ThisOutlookSession". I tried Outlook 2003 and the new Outlook
2007 beta and they all show the same behavior. The code was really simple:

Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
MsgBox "You forgot the Subject line."
Cancel = True
End Sub

Thanks.

"Sue Mosher [MVP-Outlook]" wrote:

You mean, as soon as you exit and restart Outlook, right? If so, then maybe Outlook isn't shutting down completely before you restart.

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

"Rick" wrote in message ...
When I put some code in a new outlook installation it worked. But the moment
I exit Outlook (it prompted to save the project) the Application_ItemSend
doesn't trigger anymore. The code is still there (Alt-F11). I have to
delete the vbaproject.otm, paste in the code (without saving it) in order for
it to work. But as soon as I exit Outlook (save the project or not), it
doesn't work again. Any idea? Thanks.


  #7  
Old May 26th 06, 01:56 AM posted to microsoft.public.outlook.program_vba
Rick
external usenet poster
 
Posts: 98
Default Application_ItemSend doesn't trigger after I save the vba proj

I have tried following, but the pop up window still shows in the back, not in
the front of new message window.
strMsg = "You forgot the Subject line. Do you want to continue?"
intRes = MsgBox(strMsg, vbYesNoCancel + vbDefaultButton1 +
vbSystemModel, "Keep Copy?")
Select Case intRes
Case vbNo
Item.DeleteAfterSubmit = True
Case vbCancel
Cancel = True
Case vbYes
' default behavior -- nothing to change
End Select

Cancel = True
"Rick" wrote:

I took back. I set it to medium, and it works now.
But the pop up window always shows in the back, not in the front. I tested
it in outlook 2007, which pops up in the front, but in outlook 2003 SP2, it
pops in the back. Any idea?

"Rick" wrote:

I set it to high, medium, low. It didn't make any difference.

"Sue Mosher [MVP-Outlook]" wrote:

What is your macro security setting?

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

"Rick" wrote in message ...
Hi, Sue,

No, I restarted the computer. Even power-down. I tried 3 computers here
and they have the exact behaviors. After I reboot and restart Outlook, I
"ALT-F11" and the code is there under "Project1 - Microsoft Office Outlook
Objects - ThisOutlookSession". I tried Outlook 2003 and the new Outlook
2007 beta and they all show the same behavior. The code was really simple:

Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
MsgBox "You forgot the Subject line."
Cancel = True
End Sub

Thanks.

"Sue Mosher [MVP-Outlook]" wrote:

You mean, as soon as you exit and restart Outlook, right? If so, then maybe Outlook isn't shutting down completely before you restart.

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

"Rick" wrote in message ...
When I put some code in a new outlook installation it worked. But the moment
I exit Outlook (it prompted to save the project) the Application_ItemSend
doesn't trigger anymore. The code is still there (Alt-F11). I have to
delete the vbaproject.otm, paste in the code (without saving it) in order for
it to work. But as soon as I exit Outlook (save the project or not), it
doesn't work again. Any idea? Thanks.


  #8  
Old June 22nd 06, 05:25 PM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Application_ItemSend doesn't trigger after I save the vba proj

Try correcting vbSystemModel to vbSystemModal.

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

"Rick" wrote in message ...
I have tried following, but the pop up window still shows in the back, not in
the front of new message window.
strMsg = "You forgot the Subject line. Do you want to continue?"
intRes = MsgBox(strMsg, vbYesNoCancel + vbDefaultButton1 +
vbSystemModel, "Keep Copy?")
Select Case intRes
Case vbNo
Item.DeleteAfterSubmit = True
Case vbCancel
Cancel = True
Case vbYes
' default behavior -- nothing to change
End Select

Cancel = True
"Rick" wrote:

I took back. I set it to medium, and it works now.
But the pop up window always shows in the back, not in the front. I tested
it in outlook 2007, which pops up in the front, but in outlook 2003 SP2, it
pops in the back. Any idea?

"Rick" wrote:

I set it to high, medium, low. It didn't make any difference.

"Sue Mosher [MVP-Outlook]" wrote:

What is your macro security setting?

"Rick" wrote in message ...
Hi, Sue,

No, I restarted the computer. Even power-down. I tried 3 computers here
and they have the exact behaviors. After I reboot and restart Outlook, I
"ALT-F11" and the code is there under "Project1 - Microsoft Office Outlook
Objects - ThisOutlookSession". I tried Outlook 2003 and the new Outlook
2007 beta and they all show the same behavior. The code was really simple:

Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
MsgBox "You forgot the Subject line."
Cancel = True
End Sub

Thanks.

"Sue Mosher [MVP-Outlook]" wrote:

You mean, as soon as you exit and restart Outlook, right? If so, then maybe Outlook isn't shutting down completely before you restart.



"Rick" wrote in message ...
When I put some code in a new outlook installation it worked. But the moment
I exit Outlook (it prompted to save the project) the Application_ItemSend
doesn't trigger anymore. The code is still there (Alt-F11). I have to
delete the vbaproject.otm, paste in the code (without saving it) in order for
it to work. But as soon as I exit Outlook (save the project or not), it
doesn't work again. Any idea? Thanks.


 




Thread Tools
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
Vba Project OTM - Thisoutlooksession(code) error XP User Outlook and VBA 4 May 7th 06 04:31 PM
Possible to trigger rules from MSN through VBA? Richard Lewis Haggard Outlook - General Queries 0 April 13th 06 03:25 PM
Trigger event on explorer right click (unselected item)? james Add-ins for Outlook 5 February 22nd 06 10:12 PM
Automatically trigger a VBA macro to run when connection to exchange server has been made. matt@littlealien.net Outlook and VBA 1 January 30th 06 11:29 PM
Automatically trigger a VBA macro to run when connection to exchange server has been made. matt@littlealien.net Outlook and VBA 0 January 25th 06 09:52 PM


All times are GMT +1. The time now is 03:58 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2008 Outlook Banter, part of the NewsgroupBanter project.
The comments are property of their posters.
Personal Car Finance - Adverse Credit Remortgage - Kostenlos Spiele Download - Mobile Phones - Mortgage Loans