![]() |
| 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: close, programatically, reminder, window |
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
Hi All,
I cannot find the way that close reminder window programatically. I found dismiss method here. http://msdn2.microsoft.com/en-us/library/bb176766.aspx But I cannot find close method... basically, I want these, 1 call sql query at once reminder fire - done 2 change the label of item - done 3 close reminder window Please, advice me! Thanks, soworl |
| Ads |
|
#2
|
|||
|
|||
|
There's no method of closing the window when it's opened. You can intercept
the event when a reminder fires and prevent the window from opening in the first place. Once it's opened you would have to use FindWindow() or some other Win32 API calls to get the window handle for the Reminders window and then send it a WM_CLOSE message, again using Win32 API calls. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Professional Programming Outlook 2007 Reminder Manager, Extended Reminders, Attachment Options http://www.slovaktech.com/products.htm "soworl" wrote in message ... Hi All, I cannot find the way that close reminder window programatically. I found dismiss method here. http://msdn2.microsoft.com/en-us/library/bb176766.aspx But I cannot find close method... basically, I want these, 1 call sql query at once reminder fire - done 2 change the label of item - done 3 close reminder window Please, advice me! Thanks, soworl |
|
#3
|
|||
|
|||
|
Thanks Ken,
Can you give me a useful link for intercept the event & prevent open reminder window? for your info, Here is my code '''''''''''''''''''''''''''''''''''''''''''''''''' '''''''''''''''''''''''''''''''''''''''''''''''''' ''''''''''''''''''''''''''''' Dim WithEvents myolapp As Outlook.Application Private Sub Application_Startup() Initialize_handler End Sub Sub Initialize_handler() Set myolapp = Outlook.Application End Sub Private Sub myolapp_Reminder(ByVal Item As Object) Interval = DateDiff("s", Now(), Item.End) 'seconds EnableTimer Interval * 1000, Me 'first parameter=milliseconds ' I'll add sql query here SetApptColorLabel Item, 5 End Sub '''''''''''''''''''''''''''''''''''''''''''''''''' '''''''''''''''''''''''''''''''''''''''''''''''''' ''''''''''''''''''''''''''''' Thanks, soworl "Ken Slovak - [MVP - Outlook]" wrote: There's no method of closing the window when it's opened. You can intercept the event when a reminder fires and prevent the window from opening in the first place. Once it's opened you would have to use FindWindow() or some other Win32 API calls to get the window handle for the Reminders window and then send it a WM_CLOSE message, again using Win32 API calls. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Professional Programming Outlook 2007 Reminder Manager, Extended Reminders, Attachment Options http://www.slovaktech.com/products.htm "soworl" wrote in message ... Hi All, I cannot find the way that close reminder window programatically. I found dismiss method here. http://msdn2.microsoft.com/en-us/library/bb176766.aspx But I cannot find close method... basically, I want these, 1 call sql query at once reminder fire - done 2 change the label of item - done 3 close reminder window Please, advice me! Thanks, soworl |
|
#4
|
|||
|
|||
|
The Application.Reminder() event can't be cancelled, so it's good for
telling you that a reminder has fired only, not for preventing the Reminders window from appearing. For that you want to use the Application.Reminders collection and to handle the BeforeReminderShow(Cancel As Boolean) event. If Cancel is set to True in that event the window won't open. Then you can handle the Reminders.ReminderFire() event to see what reminder is firing or use the Application.Reminder event to see that. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Professional Programming Outlook 2007 Reminder Manager, Extended Reminders, Attachment Options http://www.slovaktech.com/products.htm "soworl" wrote in message ... Thanks Ken, Can you give me a useful link for intercept the event & prevent open reminder window? for your info, Here is my code '''''''''''''''''''''''''''''''''''''''''''''''''' '''''''''''''''''''''''''''''''''''''''''''''''''' ''''''''''''''''''''''''''''' Dim WithEvents myolapp As Outlook.Application Private Sub Application_Startup() Initialize_handler End Sub Sub Initialize_handler() Set myolapp = Outlook.Application End Sub Private Sub myolapp_Reminder(ByVal Item As Object) Interval = DateDiff("s", Now(), Item.End) 'seconds EnableTimer Interval * 1000, Me 'first parameter=milliseconds ' I'll add sql query here SetApptColorLabel Item, 5 End Sub '''''''''''''''''''''''''''''''''''''''''''''''''' '''''''''''''''''''''''''''''''''''''''''''''''''' ''''''''''''''''''''''''''''' Thanks, soworl |
|
#5
|
|||
|
|||
|
thanks for your help.
I modified my source for test, but it's not working. I cannot see the msg box, "Do you want to view the reminder" do you know what's wrong? Thanks, soworl '''''''''''''''''''''''''''''''''''''''''''''''''' '''''''''''''''''''''''''''''''''''''''''''''''''' ''''''''''''''''''''''''''''' Dim WithEvents myolapp As Outlook.Application Dim WithEvents colReminders As Reminders Private Sub Application_Startup() Initialize_handler End Sub Sub Initialize_handler() Set myolapp = Outlook.Application Set colReminders = myolapp.Reminders End Sub Private Sub myolapp_Reminder(ByVal Item As Object) Interval = DateDiff("s", Now(), Item.End) 'seconds EnableTimer Interval * 1000, Me 'first parameter=milliseconds SetApptColorLabel Item, 5 End Sub Private Sub colReminders_BeforeReminderShow(Cancel As Boolean) Dim lngAns As Long lngAns = MsgBox("Do you want to view the reminder?", vbYesNo) If lngAns = vbYes Then Cancel = False Else Cancel = True End If End Sub '''''''''''''''''''''''''''''''''''''''''''''''''' '''''''''''''''''''''''''''''''''''''''''''''''''' ''''''''''''''''''''''''''''' "Ken Slovak - [MVP - Outlook]" wrote: The Application.Reminder() event can't be cancelled, so it's good for telling you that a reminder has fired only, not for preventing the Reminders window from appearing. For that you want to use the Application.Reminders collection and to handle the BeforeReminderShow(Cancel As Boolean) event. If Cancel is set to True in that event the window won't open. Then you can handle the Reminders.ReminderFire() event to see what reminder is firing or use the Application.Reminder event to see that. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Professional Programming Outlook 2007 Reminder Manager, Extended Reminders, Attachment Options http://www.slovaktech.com/products.htm "soworl" wrote in message ... Thanks Ken, Can you give me a useful link for intercept the event & prevent open reminder window? for your info, Here is my code '''''''''''''''''''''''''''''''''''''''''''''''''' '''''''''''''''''''''''''''''''''''''''''''''''''' ''''''''''''''''''''''''''''' Dim WithEvents myolapp As Outlook.Application Private Sub Application_Startup() Initialize_handler End Sub Sub Initialize_handler() Set myolapp = Outlook.Application End Sub Private Sub myolapp_Reminder(ByVal Item As Object) Interval = DateDiff("s", Now(), Item.End) 'seconds EnableTimer Interval * 1000, Me 'first parameter=milliseconds ' I'll add sql query here SetApptColorLabel Item, 5 End Sub '''''''''''''''''''''''''''''''''''''''''''''''''' '''''''''''''''''''''''''''''''''''''''''''''''''' ''''''''''''''''''''''''''''' Thanks, soworl |
|
#6
|
|||
|
|||
|
Are any macros working? What happens if you put the cursor in
Application_Startup() and press F5, does the code run and then initialize the event handlers? The code is in ThisOutlookSession? -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Professional Programming Outlook 2007 Reminder Manager, Extended Reminders, Attachment Options http://www.slovaktech.com/products.htm "soworl" wrote in message ... thanks for your help. I modified my source for test, but it's not working. I cannot see the msg box, "Do you want to view the reminder" do you know what's wrong? Thanks, soworl '''''''''''''''''''''''''''''''''''''''''''''''''' '''''''''''''''''''''''''''''''''''''''''''''''''' ''''''''''''''''''''''''''''' Dim WithEvents myolapp As Outlook.Application Dim WithEvents colReminders As Reminders Private Sub Application_Startup() Initialize_handler End Sub Sub Initialize_handler() Set myolapp = Outlook.Application Set colReminders = myolapp.Reminders End Sub Private Sub myolapp_Reminder(ByVal Item As Object) Interval = DateDiff("s", Now(), Item.End) 'seconds EnableTimer Interval * 1000, Me 'first parameter=milliseconds SetApptColorLabel Item, 5 End Sub Private Sub colReminders_BeforeReminderShow(Cancel As Boolean) Dim lngAns As Long lngAns = MsgBox("Do you want to view the reminder?", vbYesNo) If lngAns = vbYes Then Cancel = False Else Cancel = True End If End Sub '''''''''''''''''''''''''''''''''''''''''''''''''' '''''''''''''''''''''''''''''''''''''''''''''''''' ''''''''''''''''''''''''''''' |
|
#7
|
|||
|
|||
|
so rear..
the code is in thisOutlookSession. it used to call myolapp_Reminder, but not now. "Ken Slovak - [MVP - Outlook]" wrote: Are any macros working? What happens if you put the cursor in Application_Startup() and press F5, does the code run and then initialize the event handlers? The code is in ThisOutlookSession? -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Professional Programming Outlook 2007 Reminder Manager, Extended Reminders, Attachment Options http://www.slovaktech.com/products.htm "soworl" wrote in message ... thanks for your help. I modified my source for test, but it's not working. I cannot see the msg box, "Do you want to view the reminder" do you know what's wrong? Thanks, soworl '''''''''''''''''''''''''''''''''''''''''''''''''' '''''''''''''''''''''''''''''''''''''''''''''''''' ''''''''''''''''''''''''''''' Dim WithEvents myolapp As Outlook.Application Dim WithEvents colReminders As Reminders Private Sub Application_Startup() Initialize_handler End Sub Sub Initialize_handler() Set myolapp = Outlook.Application Set colReminders = myolapp.Reminders End Sub Private Sub myolapp_Reminder(ByVal Item As Object) Interval = DateDiff("s", Now(), Item.End) 'seconds EnableTimer Interval * 1000, Me 'first parameter=milliseconds SetApptColorLabel Item, 5 End Sub Private Sub colReminders_BeforeReminderShow(Cancel As Boolean) Dim lngAns As Long lngAns = MsgBox("Do you want to view the reminder?", vbYesNo) If lngAns = vbYes Then Cancel = False Else Cancel = True End If End Sub '''''''''''''''''''''''''''''''''''''''''''''''''' '''''''''''''''''''''''''''''''''''''''''''''''''' ''''''''''''''''''''''''''''' |
|
#8
|
|||
|
|||
|
Are any macros working?
What happens if you put the cursor in Application_Startup() and press F5, does the code run and then initialize the event handlers? What are your macro security settings (Tools, Macros, Security)? -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Professional Programming Outlook 2007 Reminder Manager, Extended Reminders, Attachment Options http://www.slovaktech.com/products.htm "soworl" wrote in message ... so rear.. the code is in thisOutlookSession. it used to call myolapp_Reminder, but not now. |
|
#9
|
|||
|
|||
|
security settings : medium
What happens if you put the cursor in Application_Startup() and press F5, - nothing T.T when i run the outlook, it asks whether enable macro or not. I click enable macro. "Ken Slovak - [MVP - Outlook]" wrote: Are any macros working? What happens if you put the cursor in Application_Startup() and press F5, does the code run and then initialize the event handlers? What are your macro security settings (Tools, Macros, Security)? -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Professional Programming Outlook 2007 Reminder Manager, Extended Reminders, Attachment Options http://www.slovaktech.com/products.htm "soworl" wrote in message ... so rear.. the code is in thisOutlookSession. it used to call myolapp_Reminder, but not now. |
|
#10
|
|||
|
|||
|
Show the exact code you're currently using.
So if you press F5 in that Application_Startup() code it runs and without any errors? -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Professional Programming Outlook 2007 Reminder Manager, Extended Reminders, Attachment Options http://www.slovaktech.com/products.htm "soworl" wrote in message ... security settings : medium What happens if you put the cursor in Application_Startup() and press F5, - nothing T.T when i run the outlook, it asks whether enable macro or not. I click enable macro. |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How can i set the follow up reminder time programatically? | Levarish | Outlook and VBA | 1 | November 26th 07 06:47 AM |
| Update Outlook reminder dialog programatically | j | Add-ins for Outlook | 7 | February 19th 07 10:38 PM |
| Refresh Outlook's reminder dialog programatically | j | Add-ins for Outlook | 0 | February 15th 07 01:32 PM |
| How to suppress Reminder dialog box programatically | UB | Outlook - General Queries | 0 | December 11th 06 10:56 AM |
| Window Won't Close | Jan Groshan | Outlook - General Queries | 2 | June 23rd 06 03:21 PM |