![]() |
| 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. |
|
|||||||
| Tags: application_itemsend, doesnt, project, save, trigger, vba |
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
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
|
|||
|
|||
|
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
|
|||
|
|||
|
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
|
|||
|
|||
|
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
|
|||
|
|||
|
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
|
|||
|
|||
|
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
|
|||
|
|||
|
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
|
|||
|
|||
|
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 | |
|
|
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 |