View Single Post
  #2  
Old April 24th 06, 11:00 PM posted to microsoft.public.outlook.program_forms
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default bypassing save dialog box

For Outlook 2003 I would use the AddPicture method since that version of
Outlook already has a picture control and doesn't even need to be a custom
form to show the picture. I'd venture that the method shown is used mostly
for previous versions of Outlook.

ContactItem.AddPicture("Path") will add a picture located at "Path" into the
built-in picture control in Outlook 2003's contact forms. RemovePicture is
the mirror to remove a picture image and ContactItem.HasPicture is a Boolean
property that tells you if a contact already has a picture.

Those methods and property were only added in Outlook 2003 though.

Also, if the item isn't saved in code (ContactItem.Save) the user will be
prompted to save since the item was modified after it was opened.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"philippe" wrote in message
...
Hi,

I've just implemented sue mosher's way of displaying a photograph on a
customized form... using code to load a jpg into a picture control...
... now I realize that every time my user will close the contact form, he
will be prompted to save the item.

How can I bypass this dialog box ?
Is there anything like the Application.DisplayAlerts = false of Excel VBA
?
Or how could i use (if it is possible) a sendkeys in VBScript to tell No
to
the dialog box ? (The dialog box is Yes No Cancel).

Thanks in advance,
and in case you've a better way to display a photograph in outlook 2003 i
also am interested.


Ads