Pop up reminder while i close outlook

sk21413

New Member
Outlook version
Outlook 2007
Email Account
Exchange Server 2007
I am using outlook 2007. My intention is to get the pop up reminder to update my time sheet .while i close the out look

Pls refer attachement.

If i cilk yes then the outlokk has to close it and if i click no. it has to dircet me to the particular web page where i can update my time sheet details.

as i understood this is not possible using native features built into Outlook, and i came to know that it can be done via VBA.

Since i am not familiar with VBA coding.

Could any one Provide me a sample code for this?
 

Attachments

sk21413

New Member
Outlook version
Outlook 2007
Email Account
Exchange Server 2007
Private Sub Application_Quit()
Prompt$ = "Have you updated your time sheet?"
Msg = MsgBox(Prompt$, vbYesNo + vbQuestion + vbMsgBoxSetForeground)
If Msg <> vbYes Then Exit Sub
End Sub

i have done the 50% coding . Now i want to do is if i click "yes" it should close the outlook and if i click "no" i t has to direct me the particular web page..

Please let me know the codings for this...
 

Michael Bauer

Senior Member
Outlook version
Outlook 2010 32 bit
Email Account
Exchange Server
That's even not 5% of it...
You cannot have Outlook waiting until you've filled any web page, instead you'd have to catch the clicks on the menu buttons and cancel them before Outlook starts to close. If you want your code to be reliable, it would also have to know when the user clicks the upper right cross to close it. That can be done only via the Win32 API, which is a lot of work and most likely not available for free.
However, if you just want to call a web page and let Outlook continue to close, this would do it:

Private Declare Function ShellExecute Lib "shell32.dll" Alias _
"ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, _
ByVal lpFile As String, ByVal lpParameters As String, _
ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long

sub CallWeb(Url$)
ShellExecute 0, "open", Url, "", "", 1
end sub
 

sk21413

New Member
Outlook version
Outlook 2007
Email Account
Exchange Server 2007
Thanks for your reply..
As u told i just want to call a web page and let outlook continue to close.
will the above code work for outlook 2007?
where i have to put my URL address in the above code?
As i was not familiar with VBA coding.

Could you please help me?
 
Top