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

Alternative to item.close



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old October 29th 08, 12:53 PM posted to microsoft.public.outlook.program_forms
flaterp
external usenet poster
 
Posts: 2
Default Alternative to item.close

I have an Outlook form where users input contact information. Within the form
I created a "Done" button that calls item.close (0). So the form saves
automatically and closes. However, the "Done" button no longer works. Users
must manually close the form by clicking the X and selecting yes to save any
changes. From what I've read elsewhere on this problem, the recent upgrade to
Office 2007 is the cause of the problem. Thankfully Outlook doesn't crash;
it's just unresponsive to clicking the Done button.

I see there is a hotfix out, but that would require installation on all
users' PCs. Is there a code workaround that would perform a similar save then
close sequence? I have seen item.save mentioned elsewhere, but I'm not sure
how to implement with the close. Thanks in advance for any help.
Ads
  #2  
Old October 29th 08, 01:58 PM posted to microsoft.public.outlook.program_forms
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Alternative to item.close

item.Save() is just going to save the item, it won't close it.

item.Close() or Inspector.Close() won't work when called inside the
item.Close() or Inspector.Close() event handlers but should work if called
from a button click event handler.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"flaterp" wrote in message
...
I have an Outlook form where users input contact information. Within the
form
I created a "Done" button that calls item.close (0). So the form saves
automatically and closes. However, the "Done" button no longer works.
Users
must manually close the form by clicking the X and selecting yes to save
any
changes. From what I've read elsewhere on this problem, the recent upgrade
to
Office 2007 is the cause of the problem. Thankfully Outlook doesn't crash;
it's just unresponsive to clicking the Done button.

I see there is a hotfix out, but that would require installation on all
users' PCs. Is there a code workaround that would perform a similar save
then
close sequence? I have seen item.save mentioned elsewhere, but I'm not
sure
how to implement with the close. Thanks in advance for any help.


  #3  
Old October 29th 08, 02:32 PM posted to microsoft.public.outlook.program_forms
flaterp
external usenet poster
 
Posts: 2
Default Alternative to item.close

Ken, thanks for the quick response. But please excuse my programming
ignorance. It's not clear to me the distinction between an event handler and
a button click event handler. I would assume that I have set up the latter
case. While designing the form, I click "view code". This launches the
"script editor". The only code within the script editor is:

Function DoneButton_Click
Item.Close(0)
End Function

Obviously the name of "Done" button on the form is DoneButton.

I upgraded to Office 2007 about 6 months ago, but only ran into this
item.close problem within the last 10 days. So I'm not certain about the
cause of the problem.

Thanks again for your help.



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

item.Save() is just going to save the item, it won't close it.

item.Close() or Inspector.Close() won't work when called inside the
item.Close() or Inspector.Close() event handlers but should work if called
from a button click event handler.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"flaterp" wrote in message
...
I have an Outlook form where users input contact information. Within the
form
I created a "Done" button that calls item.close (0). So the form saves
automatically and closes. However, the "Done" button no longer works.
Users
must manually close the form by clicking the X and selecting yes to save
any
changes. From what I've read elsewhere on this problem, the recent upgrade
to
Office 2007 is the cause of the problem. Thankfully Outlook doesn't crash;
it's just unresponsive to clicking the Done button.

I see there is a hotfix out, but that would require installation on all
users' PCs. Is there a code workaround that would perform a similar save
then
close sequence? I have seen item.save mentioned elsewhere, but I'm not
sure
how to implement with the close. Thanks in advance for any help.



  #4  
Old October 29th 08, 05:44 PM posted to microsoft.public.outlook.program_forms
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Alternative to item.close

Your code is executing inside a custom button Click event handler, so it
should be OK. If the code worked before I'd be checking to see what changed,
I don't have that problem here in any of my Outlook 2007 setups if I call
Item.Close in form code.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"flaterp" wrote in message
...
Ken, thanks for the quick response. But please excuse my programming
ignorance. It's not clear to me the distinction between an event handler
and
a button click event handler. I would assume that I have set up the latter
case. While designing the form, I click "view code". This launches the
"script editor". The only code within the script editor is:

Function DoneButton_Click
Item.Close(0)
End Function

Obviously the name of "Done" button on the form is DoneButton.

I upgraded to Office 2007 about 6 months ago, but only ran into this
item.close problem within the last 10 days. So I'm not certain about the
cause of the problem.

Thanks again for your help.


 




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
Close a Excel Workbook when close a userform in Outlook [email protected] Outlook and VBA 2 May 8th 08 02:54 PM
Outlook 2007 crashes bye the use of "item.close" Oskar Vaia Outlook - Using Forms 3 October 16th 07 06:50 PM
Function Item.close Outlook 2007 JCCKIKI Outlook - Using Forms 2 October 3rd 07 11:01 AM
Outlook 2007 and Item.Close slbergh Outlook - Using Forms 2 June 8th 07 06:11 AM
Item.Save and Item.Close Script causes Outlook 2007 to Crash Rayyan Outlook - Using Forms 6 November 25th 06 03:14 AM


All times are GMT +1. The time now is 10:30 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.