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

bypassing save dialog box



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old April 25th 06, 10:32 AM posted to microsoft.public.outlook.program_forms
philippe
external usenet poster
 
Posts: 14
Default bypassing save dialog box

Thank you Ken.

I have to use a custom form, and thus can't use the picture control hence my
problem.
I do not save the item in the code for users on whose machines the code will
execute won't have writing permissions to the public folder.

I wonder if it is possible to use a picture control, load a pic in it, and
get it saved within the item (without one offing the form)... then I could
prepare all items in VBA on the public folder, and would not need any code to
execute on user's machines (which I prefer).

Obviously the AddPicture method only refers to THE picture control that one
can see on the contact form (as long as one does not modify the general tab).
As a matter of fact : I can't see in the method description any argument
dedicated to tell which picture control to use as a destination.

Sue Mosher uses a load method on a control of what seems to be an undefined
type :
Function Item_Open()
Set objInsp = Item.GetInspector
Set objPage = objInsp.ModifiedFormPages("General")
Set imgPicture = objPage.Controls("Image4")
If Item.BillingInformation "" Then
imgPicture.Picture = _
LoadPicture(Item.CustomFieldPictureAddress)
End If
End Function

I'm thus have the feeling that it's not possible to have a photograph saved
into an item and displayed in a picture control.
Thus my original questions :
- to hide the saving prompt to users or
- find a way to control to save things in a notes control - I don't
understand how outlook stores pictures or the content of the notes.

Thanks to you or anyone for reading up to this point.
Regards,
Philippe


"Ken Slovak - [MVP - Outlook]" wrote:

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.



  #2  
Old April 25th 06, 03:45 PM posted to microsoft.public.outlook.program_forms
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default bypassing save dialog box

Sue's code uses an Image control. You have to use an image control or
something like that or the built-in control for Outlook 2003. If you modify
an item the user will get prompted, no matter what you do if you don't save
the item. If you save something "within the item" you are saving the item.

Something has to give, you can't have everything you want.

--
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
...
Thank you Ken.

I have to use a custom form, and thus can't use the picture control hence
my
problem.
I do not save the item in the code for users on whose machines the code
will
execute won't have writing permissions to the public folder.

I wonder if it is possible to use a picture control, load a pic in it, and
get it saved within the item (without one offing the form)... then I could
prepare all items in VBA on the public folder, and would not need any code
to
execute on user's machines (which I prefer).

Obviously the AddPicture method only refers to THE picture control that
one
can see on the contact form (as long as one does not modify the general
tab).
As a matter of fact : I can't see in the method description any argument
dedicated to tell which picture control to use as a destination.

Sue Mosher uses a load method on a control of what seems to be an
undefined
type :
Function Item_Open()
Set objInsp = Item.GetInspector
Set objPage = objInsp.ModifiedFormPages("General")
Set imgPicture = objPage.Controls("Image4")
If Item.BillingInformation "" Then
imgPicture.Picture = _
LoadPicture(Item.CustomFieldPictureAddress)
End If
End Function

I'm thus have the feeling that it's not possible to have a photograph
saved
into an item and displayed in a picture control.
Thus my original questions :
- to hide the saving prompt to users or
- find a way to control to save things in a notes control - I don't
understand how outlook stores pictures or the content of the notes.

Thanks to you or anyone for reading up to this point.
Regards,
Philippe


  #3  
Old April 25th 06, 06:31 PM posted to microsoft.public.outlook.program_forms
philippe
external usenet poster
 
Posts: 14
Default bypassing save dialog box

Hi,
I well know I can't get everything I want. Thanks for your interest.

I've just tried this :
Executed Sue's code in VBA (outside of the form), and added a save item.
I run the code on the all folder.
When I open any item, i get the picture properly displayed, and since the
loading is not done at the item open, no request for saving.
Works just like I wished it would... except if I restart Outlook, then I
realised, that nothing was saved... it's like if what have been saved is a
property for a control in each contact for as long as this outlook session
last.

I'm not surprised I expected nothing would "actually" be saved into the item.
I'm more impressed by the fact that it "works" while the session last !
But it does not solve the issue : how to save a pic with an item without one
offing and while using a custom form ?

"Ken Slovak - [MVP - Outlook]" wrote:

Sue's code uses an Image control. You have to use an image control or
something like that or the built-in control for Outlook 2003. If you modify
an item the user will get prompted, no matter what you do if you don't save
the item. If you save something "within the item" you are saving the item.

Something has to give, you can't have everything you want.

--
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
...
Thank you Ken.

I have to use a custom form, and thus can't use the picture control hence
my
problem.
I do not save the item in the code for users on whose machines the code
will
execute won't have writing permissions to the public folder.

I wonder if it is possible to use a picture control, load a pic in it, and
get it saved within the item (without one offing the form)... then I could
prepare all items in VBA on the public folder, and would not need any code
to
execute on user's machines (which I prefer).

Obviously the AddPicture method only refers to THE picture control that
one
can see on the contact form (as long as one does not modify the general
tab).
As a matter of fact : I can't see in the method description any argument
dedicated to tell which picture control to use as a destination.

Sue Mosher uses a load method on a control of what seems to be an
undefined
type :
Function Item_Open()
Set objInsp = Item.GetInspector
Set objPage = objInsp.ModifiedFormPages("General")
Set imgPicture = objPage.Controls("Image4")
If Item.BillingInformation "" Then
imgPicture.Picture = _
LoadPicture(Item.CustomFieldPictureAddress)
End If
End Function

I'm thus have the feeling that it's not possible to have a photograph
saved
into an item and displayed in a picture control.
Thus my original questions :
- to hide the saving prompt to users or
- find a way to control to save things in a notes control - I don't
understand how outlook stores pictures or the content of the notes.

Thanks to you or anyone for reading up to this point.
Regards,
Philippe



  #4  
Old April 26th 06, 03:52 PM posted to microsoft.public.outlook.program_forms
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default bypassing save dialog box

I can't think of anything else.

If you add a control to your custom form after it's published that will
one-off the form. If you add the picture to the control and want it there
always you must save the item so the picture remains.

--
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 well know I can't get everything I want. Thanks for your interest.

I've just tried this :
Executed Sue's code in VBA (outside of the form), and added a save item.
I run the code on the all folder.
When I open any item, i get the picture properly displayed, and since the
loading is not done at the item open, no request for saving.
Works just like I wished it would... except if I restart Outlook, then I
realised, that nothing was saved... it's like if what have been saved is a
property for a control in each contact for as long as this outlook session
last.

I'm not surprised I expected nothing would "actually" be saved into the
item.
I'm more impressed by the fact that it "works" while the session last !
But it does not solve the issue : how to save a pic with an item without
one
offing and while using a custom form ?


 




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
Empty Dialog Box Will T Outlook - General Queries 1 March 29th 06 11:06 PM
unable to open dialog box rglion Outlook - Calandaring 4 March 16th 06 10:11 AM
Location info dialog box kathrynatgwens Outlook - General Queries 1 February 27th 06 06:54 PM
Resource Scheduled dialog box FBGWeezer Outlook - Calandaring 1 February 24th 06 05:23 PM
Word print dialog box Martin Outlook - Using Forms 1 January 31st 06 02:05 PM


All times are GMT +1. The time now is 12:54 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-2025 Outlook Banter.
The comments are property of their posters.