Variables Error

@srmbimser

Thanks for sharing the screenshot.

You are executing the different VBA code. The input document does not has the same VBA code. In the input document there are two modules i.e. Module1, Module2. Following is the VBA code.

_Moudle1_
Sub Grafik()
SOPupdate.Show
End Sub

_Module2_
Sub drop()
On Error Resume Next
SOPupdate.dropdown.Show

End Sub

In the shared screenshot, the code is

Sub Grafik()
'
'''Grafic Macro
'
'

End Sub

There is another module i.e. newMacros in the screenshot.

The code in input document and output document generated by Aspose.Words is same. So, there is no issue with output DOC file. Please make sure that you are using the same VBA code at your end.

I think I couldn’t explain my problem. I can see problem but why macros are changed although I Don’t do anything expect that I save document with Aspose Word. Only I am using Aspose.Word document and macros are changing .

@srmbimser

In this project, you are re-saving the DOC file. If you are using different code at your end, please share it here for further testing.

Please generate the output document using Aspose.Words for .NET 18.10 and share it. We will execute the same macro at our end and share our findings with you. Please share the same document for which you are getting error.

We are using Aspose.Word 18.10 version. We are using following code block in Test Project

static void Main(string[] args)
        {
            Aspose.Words.Document doc = new Aspose.Words.Document("SB.053_0.doc");

            doc.Save("SB.053_1.doc");
            //Workbook wb = new Workbook("original Doc.xls");
            //wb.Save("output.pdf");

            //Open the pdf
            Process.Start("SB.053_1.doc");

            Console.WriteLine("Done. Press any key to continue...");
            Console.ReadKey();
        }

@srmbimser

We used the same code to test the scenario and shared the output document with you in this thread. There is no issue with VBA code.

Please share this detail for further testing.

Ok I want to explain again .You and me ,we are using same code but your file is fine and our file is corrupted and we try same operation system with you. Could you please tell me what kind of property may give this result. e.g Can Antivirüs programme do this?

@srmbimser

Thanks for your inquiry. As already shared in this thread that Aspose.Words does nothing with macros while re-saving document. Perhaps, there is some issue at your end that causes this exception. You might be using different VBA code or document. We have not found any issue with the shared document in this thread.