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

O

Oskar Vaia

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("commandbutton5").caption

Dim RetMsgBox
Select Case CB5Caption
Case "1. XXX"
item.userproperties("Mahnung1").Value = True
Item.GetInspector.ModifiedFormPages("Test").Controls("LabelMB1").Visible
= True
getinspector.modifiedformpages("Test").controls("commandbutton5").caption
= "2. sollecito"
Case "2. XXX"
item.userproperties("Mahnung2").Value = True
Item.GetInspector.ModifiedFormPages("Test").Controls("LabelMB2").Visible
= True
GetInspector.ModifiedFormPages("Test").Controls("CommandButton5").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
 
O

Oskar Vaia

Hi,

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

thx & bye

Oskar
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top