Outlook crashes by applying folder view with Vbscript Write_Event

T

Twardon

Hello everybody,

I devoleped a form for which In-Cell editing would create undesireable
changes in data.
Because of the I applied Sues Moshers Workaround to disable In-Cell
Editing:
(http://www.outlookcode.com/codedetail.aspx?id=79)

See below:

<code>
Sub Item_Open
blnOKToSave = True
End Sub

Sub Item_Write()
If Not blnOKToSave Then
Set objExplorer = Application.ActiveExplorer
objExplorer.CurrentView = "Aufgabenansicht (ohne Bearbeiten)" '###
ERRORLINE!
Item_Write = False
End If
End Sub
</code>

I found out, that the changes I did to the fields in In-Cell View were
restored by resetting the view or by actualizing it switching to
another folder and back.

I do not want the users to change the default view anyway. That brought
me to the idea of restoring the view everytime a user tries to change
an In-Cell value.
^^see code snippet above.

The problem is now, that outlook completely crashes after running the
errorline marked above. I don't mean a script error on Line yada yada.
- There's an Outlook-Crash and a request for an Error-Report.

Can you imagine why?

However. On Outlook restart somehow the view I selected in the
Errorline is show.
Maybe because it's the default-view. Don't know.

Any help is greatly appreciated.

regards,
Tobias Twardon
 

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