Open koppor opened 3 years ago
I did something similar. I just used the path of the system32 folder, but it didn't result in a crash. So what are our differences. I am on Win10 64-bit and Outlook 2019 64-bit. What is on you side?
I checked again and I can confirm to get runtime error 48.
But googling for the error states "Error in loading DLL (Error 48) (maybe a false/missed translation) which is of course another error than yours.
I have Microsoft® Outlook® 2019 MSO (Version 2109 Build 16.0.14430.20154) 32 Bit
running on Microsoft Windows [Version 10.0.19042.1288]
(64bit)
Ok, I guessed/hoped that you are on 32-bit Outlook. I know it from an Excel AddIn that when the signatures of the functions don't match that 32-bit versions crash and 64-bit versions not. So I strongly believe that this is the same problem here.
Since all parameters are strings and the return value the function is an integer I don't think we can solve this. Do you have any hopes/ideas?
Regarding the crash, I got following hint:
Have you tried inspecting the DLL in Visual Studio to see what it exports? I don't have Outlook 2019, only 365. You could then try writing something to call the DLL in Visual Studio to see if you can trap the error.
That are good news. I didn't know that this is possible. But now knowing I found Which program in Visual Studio lets me look into DLLs to see its API? on StackOverflow. There are also listed other tools than Visual Studio that should be able to show the signatures, especially in user4898056's answer.
Please let me know which tool worked for you.
Thank you for the links! I hope, I can investigate on beginning of November!
Following Boolean enables QuoteColorizer: https://github.com/macros4outlook/quotefixmacro/blob/052a377e4fce1111a4768da859f161bdcd746bd8/QuoteFixMacro.bas#L43
That, in turn, requires
mapirtf.dll
.This file is from 1997-08-28 and can be retrieved from http://download.microsoft.com/download/mapi/utility/11/w9xnt4/en-us/mapirtf.exe. (Linked from KB 172038).
That
.exe
can be extracted with 7zip.About 2008, it worked to copy
mapirtf.dll
toC:\Windows\System32
.Now, I get the following error:
That translates to "Runtime error 53" "File not found: mapirtf.dll".
Via https://stackoverflow.com/q/53316591/873282 - "Call C++ DLL from VBA". Very similar issue (Run-time error '53'). I came to following solution:
mapirtf.dll
toc:\temp\mapirtf.dll
Public Declare PtrSafe Function ReadRTF _
-->Lib "c:\temp\mapirtf.dll" _
Unfortunately, Outlook 2019 completely crashes when executing
ReadRTF
--> https://github.com/macros4outlook/quotefixmacro/blob/052a377e4fce1111a4768da859f161bdcd746bd8/QuoteFixMacro.bas#L1516