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

Outlook 2007 crashes bye the use of "item.close"



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old October 16th 07, 06:15 PM posted to microsoft.public.outlook.program_forms
Oskar Vaia
external usenet poster
 
Posts: 29
Default Outlook 2007 crashes bye the use of "item.close"

Hi,

i have develop a new task-form with the following code in it:

---
sub commandbutton5_click()
Const olSave = 0

Dim CB5Caption
CB5Source = 1
CB5Caption =
getinspector.modifiedformpages("Test").controls("c ommandbutton5").caption

Dim RetMsgBox
Select Case CB5Caption
Case "1. XXX"
item.userproperties("Mahnung1").Value = True
Item.GetInspector.ModifiedFormPages("Test").Contro ls("LabelMB1").Visible
= True
getinspector.modifiedformpages("Test").controls("c ommandbutton5").caption
= "2. sollecito"
Case "2. XXX"
item.userproperties("Mahnung2").Value = True
Item.GetInspector.ModifiedFormPages("Test").Contro ls("LabelMB2").Visible
= True
GetInspector.ModifiedFormPages("Test").Controls("C ommandButton5").Caption
= "3. sollecito"
End Select

CB5Source = 0
Item.Close olSave
end sub
---

The form does close but than Outlook always crashes and restart.
Is the use of "Item.Close olSave" in this mode correct in my code?

thx & bye

Oskar


Ads
  #2  
Old October 16th 07, 06:38 PM posted to microsoft.public.outlook.program_forms
Oskar Vaia
external usenet poster
 
Posts: 29
Default Outlook 2007 crashes bye the use of "item.close"

Hi,

for info:
my code works fine in Outlook 2003 but Outlook 2007 always crash.

thx & bye

Oskar
  #3  
Old October 16th 07, 07:47 PM posted to microsoft.public.outlook.program_forms
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Outlook 2007 crashes bye the use of "item.close"

Known problem. See http://outlookcode.com/article.aspx?id=59, under Problems with Methods and Properties.

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"Oskar Vaia" wrote in message ...
Hi,

for info:
my code works fine in Outlook 2003 but Outlook 2007 always crash.

thx & bye

Oskar

  #4  
Old October 16th 07, 07:50 PM posted to microsoft.public.outlook.program_forms
Hollis Paul
external usenet poster
 
Posts: 242
Default Outlook 2007 crashes bye the use of "item.close"

In article , Oskar
Vaia wrote:
Const olSave = 0

This construction does not work in VBScript. You have to use Dim and
then use an equate that sets the value to 0 in the Item_Open event.

Item.Close olSave


Doesn't Item.Close 0 work?

--
Hollis Paul
Mukilteo, WA USA


 




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
Outlook 2007 crashes on "Calendar click" Kyryl Outlook - Calandaring 15 September 28th 09 10:59 PM
Opening *.PST file: "Can't open this item. Outlook blocked access to this potentially unsafe item." R2D2 Outlook - General Queries 1 September 16th 07 09:14 AM
Why is the "X" used for delete so close to the "save and close"? Carol Outlook - Using Contacts 3 July 29th 07 04:31 AM
I do not have "Encoding" item in my "View" menu of Outlook 2003? Baher Outlook - Installation 0 June 20th 06 10:35 AM
Don't use "X" in outlook as delete icon, it looks like "close" HuskieChem Outlook - Installation 1 January 9th 06 03:02 AM


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