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 - Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

closing form



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old May 3rd 06, 12:14 PM posted to microsoft.public.outlook.program_forms
philippe
external usenet poster
 
Posts: 14
Default 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
Ads
  #2  
Old May 3rd 06, 02:02 PM posted to microsoft.public.outlook.program_forms
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default 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

 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
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
Closing Outlook correctly PhilipPainter Outlook and VBA 3 April 25th 06 03:50 PM
Closing Outlook 2000 JohnB Outlook - General Queries 4 April 19th 06 07:27 PM
Closing Outlook 2003 MCKSR Outlook - General Queries 0 February 6th 06 10:35 PM
Deleted a draft accidently when closing deitra Outlook Express 3 January 30th 06 01:29 AM
Dialog Box Error when closing deitra Outlook Express 1 January 30th 06 12:23 AM


All times are GMT +1. The time now is 05:45 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.