PC Review


Reply
Thread Tools Rate Thread

Alternative to item.close

 
 
flaterp
Guest
Posts: n/a
 
      29th Oct 2008
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.
 
Reply With Quote
 
 
 
 
Ken Slovak - [MVP - Outlook]
Guest
Posts: n/a
 
      29th Oct 2008
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" <(E-Mail Removed)> wrote in message
news:09A939D6-8565-4389-BB36-(E-Mail Removed)...
>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.


 
Reply With Quote
 
flaterp
Guest
Posts: n/a
 
      29th Oct 2008
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" <(E-Mail Removed)> wrote in message
> news:09A939D6-8565-4389-BB36-(E-Mail Removed)...
> >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.

>
>

 
Reply With Quote
 
Ken Slovak - [MVP - Outlook]
Guest
Posts: n/a
 
      29th Oct 2008
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" <(E-Mail Removed)> wrote in message
news:EB920606-21B8-4DAC-843D-(E-Mail Removed)...
> 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.


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Google Adsense Alternative - Commission Junction Alternative -ClickBank Alternative William9999 Windows XP Performance 0 2nd Nov 2010 09:01 AM
Item.Save and Item.Close Script causes Outlook 2007 to Crash =?Utf-8?B?UmF5eWFu?= Microsoft Outlook Form Programming 6 25th Nov 2006 03:14 AM
selecting an alternative item from a combo box David Gartrell Microsoft Access Forms 1 2nd Jun 2006 02:16 PM
e.Item.Cells(x) alternative cjburkha Microsoft ASP .NET 2 7th Apr 2006 06:35 PM
Alternative behavoir of button Send in Task item Alexey Yukhovich Microsoft Outlook Program Addins 11 21st May 2004 09:25 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:11 AM.