Variables Error

Hi,
We have a Word document which has macros. When we run macros on our original document there is no problem but when we save it with aspose Word it shows an error. Macro password is 6414424. I attached original document, faulty file and error message.

mefar.zip (217.1 KB)

@srmbimser

Thanks for your inquiry. The macro in your document tries to connect SQL Server. We have tested the scenario and have not found the shared issue. Please try the latest version of Aspose.Words for .NET 18.10 and let us know how it goes on your side. Hope this helps you.

We have attached the output DOC file with this post for your kind reference. 18.10.zip (76.2 KB)

SB.053_0 (1).zip (60.0 KB)
Problem is continue .We cut sql server connection.You can try with this file Pass is 6414425

@srmbimser

Thanks for your inquiry. We have tested the scenario using following code example. We have opened the “18.10.doc” in MS Word and run the macro “Grafik”. Please check the attached image for output. Please try the latest version of Aspose.Words for .NET 18.10 and let us know how it goes on your side. We have attached the output DOC with this post for your kind reference. 18.10.zip (56.1 KB)

Document document = new Document(MyDir + "SB.053_0 (1).doc");
document.Save(MyDir + "18.10.doc");

If you still face problem, please share the steps here to reproduce this issue at our end. Thanks for your cooperation.

Hi,We test with 18.10 but problem is continue. We create test application for u.

Project is 23MB I can not upload from here. You can download following link
http://dm.bimser.com.tr/eba.net/Default.aspx?turl=ZBk23J2uOkmwUjDYVMe1sw

@srmbimser

Thanks for sharing the detail. Unfortunately, we are unable to download this project. Could you please share it again? Thanks for your cooperation.

Could you please try again.

@srmbimser

Thanks for sharing the detail. We have executed the shared project and have not found the shared issue using Aspose.Words for .NET 18.10. Please check the attached image.

https://imgur.com/a/DC67UcP

I tried with same project and attach screen shot for uaspose1.png (107.0 KB)
aspose3.png (133.0 KB)
aspose2.png (154.5 KB)

@srmbimser

Thanks for sharing the detail. Please note that Aspose.Words does nothing with macros while re-saving document. We have opened the document “SB.053_0.doc” in MS Word 2016, edit the macro (Grafik) and faced the same issue. This issue is with your input document. Please check the attached image for detail.

Please close all Word documents and open only “SB.053_0.doc”. Execute the macro to see this issue.

I attached test Project for you again. You can download following link
http://dm.bimser.com.tr/eba.net/Default.aspx?turl=n4cwZ9NmFku2rNLS6eKYCQ
In the Project folder you can see original file which has not error(filename:SB.053_0.doc). When you run test Project it create corrupted file(filename:SB.053_1.doc) Could you please try again.

@srmbimser

Thanks for your inquiry. We have executed the shared .exe file at our end. We have run the macro and have not faced any exception. We have attached the output DOCX generated by your .exe file with this post for your kind reference. SB.053_1.zip (60.4 KB)

You are using Aspose.Words in evaluation mode. We suggest you please get the temporary license from following link and apply it before importing the document into Aspose.Words’ DOM.
Get a Temporary License

We have tested the scenario at Windows 10. If you still face problem after applying the license, please share your operating system detail for further testing. Thanks for your cooperation.

Hi,
We have tasted apllying our company aspose licance at Windows 10 and Windows 8 .Problem still is continue. It is very important for us. Is there any thing to control

@srmbimser

Thanks for your inquiry. We tested this scenario at Windows 10 and did not find this issue.

Could you please share the steps that you are using to reproduce this issue at our end? Thanks for your cooperation.

Hi,
We have been checked your file,yes it is fine but when we try to create file on our computer it seems as corrupted. Our application is used on too kind of customer. We can’t decide server version. I think it is not depends on server version. Could you please send us an example code or application or how can we show you our problem? For example Can you connect our pc?

@srmbimser

Thanks for your inquiry. Please note that we only provide support via forum. We used the following steps to test this scenario. If you are using different steps, please share them here.

  1. Re-save the document using Aspose.Words. E.g. output file name is SB.053_1.doc.
  2. Open the document in MS Word.
  3. Click the button “Enable Content”
  4. Click the “Developer” tab, and then click “Macros” from code section.
  5. Select the macro “Grafik” and click “Edit”.
  6. Type the password 6414425
  7. Under Project (SB.053_1.doc), click “Module1”
  8. Click the Run button to run the Grafik().

Please note that Aspose.Words does nothing with macros while re-saving document. This is not a bug in Aspose.Words.

Yes we are using this method but why when you try on your computer your output file is fine and why we try on our computer our output file is corrupted ?.Could you please talk us what kind of property can expose this result?result

@srmbimser

Thanks for your inquiry. We have executed the macro at different system and have not found this issue. Could you please download the attached output document and run the macro at some other system at your end? SB.053_1.zip (60.4 KB)

Please also try to re-save the input DOC file using MS Word and run the macro. Please share your findings here for our reference.

Hi,
Ok when I try file which you send me on my computer or other server it is fine but when I run my app on my computer or other server and create file it is corrupted. I attach my error messageaspose.png (14.8 KB)