

But when running the product and while launching Word from it, the following run-time error is generated Private Declare Sub MyFunction Lib " My_Lib.dll " (ByVal InStr As String, ByVal OutStr As String, ByVal OutSize As Long) Private Declare PtrSafe Sub MyFunction Lib "C:\Progra~1\.\ My_Lib.dll " (ByVal InStr As String, ByVal OutStr As String, ByVal OutSize As Long) So the Function Declaration was modified as given below to make it compatible with VBA7 Please review and update Declare statements and then mark them with the PtrSafe attribute. The code in this project must be updated for use on 64-bit systems. Private Declare Sub MyFunction Lib "My_Lib.dll" (ByVal InStr As String, ByVal OutStr As String, ByVal OutSize As Long)

The following piece of code was giving the below mentioned error. But when these Macros are loaded in Office 2010 64 bit, the code was not compiling. Our product has Macros written in VBA 6 for Word.
