Outlook Banter

Outlook Banter (http://www.outlookbanter.com/)
-   Outlook - Using Forms (http://www.outlookbanter.com/outlook-using-forms/)
-   -   closing form (http://www.outlookbanter.com/outlook-using-forms/13570-closing-form.html)

philippe May 3rd 06 12:14 PM

closing form
 
Hello,
The code below works fine for the owner of the contact folder, but not for
readers who are not allowed to perform...

The problem is with " Item.Close(olDiscard) " which I use to avoid the user
being prompted to save|discard changes made by the Item_Open() function.

Does anyone know how to go round this problem ?
Thanks in advance,
Philippe

------------------------------------------
Function Item_Open()
Set objInsp = Item.GetInspector
Set objPage = objInsp.ModifiedFormPages("Général")
Set imgPicture = objPage.Controls("Image4")
If Item.BillingInformation "" Then
imgPicture.Picture = _
LoadPicture(Item.BillingInformation)
End If
End Function


Function Item_Close()
Item.Close(olDiscard)
End Function
------------------------------------------
Thank you,
Philippe

Sue Mosher [MVP-Outlook] May 3rd 06 02:02 PM

closing form
 
You can't call Close inside the Close event. I don't know of any way to avoid that prompt if users can't save the item.

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

"philippe" wrote in message ...
Hello,
The code below works fine for the owner of the contact folder, but not for
readers who are not allowed to perform...

The problem is with " Item.Close(olDiscard) " which I use to avoid the user
being prompted to save|discard changes made by the Item_Open() function.

Does anyone know how to go round this problem ?
Thanks in advance,
Philippe

------------------------------------------
Function Item_Open()
Set objInsp = Item.GetInspector
Set objPage = objInsp.ModifiedFormPages("Général")
Set imgPicture = objPage.Controls("Image4")
If Item.BillingInformation "" Then
imgPicture.Picture = _
LoadPicture(Item.BillingInformation)
End If
End Function


Function Item_Close()
Item.Close(olDiscard)
End Function
------------------------------------------
Thank you,
Philippe



All times are GMT +1. The time now is 08:34 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-2006 OutlookBanter.com