Outlook Banter

Outlook Banter (http://www.outlookbanter.com/)
-   Outlook - Using Forms (http://www.outlookbanter.com/outlook-using-forms/)
-   -   Outlook 2007 crashes bye the use of "item.close" (http://www.outlookbanter.com/outlook-using-forms/59097-outlook-2007-crashes-bye-use.html)

Oskar Vaia October 16th 07 06:15 PM

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



Oskar Vaia October 16th 07 06:38 PM

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

Sue Mosher [MVP-Outlook] October 16th 07 07:47 PM

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


Hollis Paul October 16th 07 07:50 PM

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




All times are GMT +1. The time now is 08:51 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-2006 OutlookBanter.com