Outlook crashes when creating new item via VBS since Windows 10

  • Thread starter Thread starter Filip Renfred
  • Start date Start date
F

Filip Renfred

Guest
Hi,

I am using the following code for years. In all version of Outlook, to Outlook 2013, Outlook 2016, Outlook 2019. One difference though. I recently had to upgrade old, good Windows 7 (EN,. 64-bit) to new, bloated, bad bad bad Windows 10 (EN, 64-bit).

I am using 32-bit Office everywhere.

But experimenting with this error, this error appears even at 64-bit version of the Office.



It is Custom Form where I have a button to "clone" the item... i.e. to create a new one and set some of the values. See VBS code below: cmdKlon_Click()

Whenever the code runs to nova.Subject or nova.UserProperties() assignment, it causes Outlook to disappear.

I trace the crash by inserting MsgBox "test one" MsgBox "test two" and this way I see exact line where the code causes Outlook to silently die. It is always At the time new Item of my customized MessageCalss is created (Task type of item), not being saved and just as I try to modify the value of property thereof.

Adding of the new item itself does nothing wrong.


Boom. As if Outlook never was running. It silently disappears from applications. Not even Outlook.exe is running in TaskManager. It all happens so so quickly.

Poof.

When looking into Windows Event Viewer, I can see clear error message:

Faulting application name: OUTLOOK.EXE, version: 15.0.4659.1000, time stamp: 0x5417eba5
Faulting module name: OUTLOOK.EXE, version: 15.0.4659.1000, time stamp: 0x5417eba5
Exception code: 0xc0000005
Fault offset: 0x003c76b2
Faulting process id: 0x24c4
Faulting application start time: 0x01d5e7015563932f
Faulting application path: C:\Program Files (x86)\Microsoft Office\Office15\OUTLOOK.EXE
Faulting module path: C:\Program Files (x86)\Microsoft Office\Office15\OUTLOOK.EXE
Report Id: a920502d-e27c-4a9e-89d6-2932c3fd3e97
Faulting package full name:
Faulting package-relative application ID:



Yes, I tried to run it in Safe mode. Yes it crashes also in Safe mode.

With updates, without updates. All versions.

Only difference is Win 7---->Win10.

No antivirus. No bloatware. I am positive I turned off all bloatware. Tried many machines, many Offices.

All computers look into the same Exchange mailbox.

Also when I put it into PST file, problem stays. It is problem of more forms, so not, not corrupted form.

I also cleaned form cache, repaired OST file. removed OST file. Repaired Office. Nothing. Nothing works.



Only I was able to observe this chain is involved:

ntdll.dll

kernel32.dll

user32.dll

fm20.dll

C:\Windows\System32\FM20.DLL

C:\Windows\SysWOW64\FM20.DLL

vbscript.dll

C:\Windows\System32\vbscript.dll

C:\Windows\SysWOW64\vbscript.dll

outlvbs.dll "C:\Program Files (x86)\Microsoft Office\Office15\OUTLVBS.DLL"

outlook.exe


From this chain and from the fact that it is Windows 10 what makes problem I assume, there is some bad bad bad bug in all Outlook versions.

Not to be so easy, there are at least two patches I know they cripple VBS functionality an altogether:

KB4475563

KB3054854

So when you try to reproduce my problem, please make sure you conform to these registry

https://www.slipstick.com/outlook/custom-form-security/

and make sure you uninstall the two patches that cripple the VBS functionality before you even can test the error.


I wish someone from Microsoft could take care of this part of functionality because it starts to be real Hell to kepp it working.


The function that causes Outlook to crash silently is:


Function cmdKlon_Click()
Dim fld, polozky, nova
Set fld= Item.Parent
Set polozky=fld.Items
Set nova=polozky.Add (Item.MessageClass)
nova.Subject= "## KLONOVÁNO ## " & Item.Subject
nova.UserProperties("Zdroj")=Item.UserProperties("Zdroj")
nova.Categories=Item.Categories
nova.UserProperties("ProgJazyk")=Item.UserProperties("ProgJazyk")
nova.UserProperties("ZeKdy")=Item.UserProperties("ZeKdy")
nova.UserProperties("Aplikace")=Item.UserProperties("Aplikace")
nova.UserProperties("Projekt")=Item.UserProperties("Projekt")
nova.UserProperties("SouborNazev")=Item.UserProperties("SouborNazev")
nova.Display
End Function


The similar function I use in more forms, all have the same issue.

The issue will lie somewhere in the DLL chain I suggested. Somewhere in what changed from Windows 7 to Windows 10. The same form run on Windows 7 machine, still runs ok as it run for ages e.g. 20 years ago into history in all various possible machines and Offices 32-bit versions backwards and even forwards (i.e. testing Office 2019 virtual machine, all went fine).


Thank you for any help

Best Regards

Continue reading...
 
Back
Top