Hi,
I have read a MS Word document to a binary field in my database. This document contains some macro’s I need when the document is processed by Aspose and sent to de client.
For some reason the macro’s are lost after I have called the Word.Open method from Aspose.Word. It doesn’t make a difference if I read the document from the binary field to memorystream or to file.
The document is correct in the database. When I stream it out of the binary to a file and open it with MS Word the macro’s are still there. But when I call the Open method from Aspose the macro’s are gone.
Am I missing some property ?
The Aspose.Word.dll I am using is version 1.6.1.0
Thanks in advance,
Richard Bergmans
Ingenieursbureau van der Linden
The Netherlands
Hi Richard,
Can you send your original document to word@aspose.com. VBA and macros is not very well documented in DOC file format, but I will provide a fix asap.
By the way, can you also post a fragment of your code how to read a document from a field in the database, it will help your Dutch neighbour Martin: read out word document fom db.
Hi Roman,
I shall send you the document on word@aspose.com. The Dutch neighbour Martin is also my collegue. We are building on the same application, the problems we had were reading the binary field to memorystream. For now we read it to filestream and open the saved document.
Thanks in advance,
Richard Bergmans
Ingenieursbureau van der Linden
The Netherlands
Hi Aspose.Word 1.6.4 fixes this problem.
Hi Roman,
Thanks a lot, it works great now. Maybe a stupid question, but is there also a way to add vba projects at run-time ?
Thanks in advance,
Richard Bergmans
Ingenieursbureau van der Linden
The Netherlands
At the moment I can’t promise we will add this feature because it seems so much off track from our current plans for Aspose.Word. Maybe you can just add all vba code into the project beforehand?
Hi,
Ok, I was just curious. It’s more a nice to have functionality.
Regards,
Richard Bergmans
Hi,
As I mentioned before the VBA projects are preserved perfectly, but I ran into another issue in combination with the VBA projects. I use a digital signature (certificate) for my VBA projects so the users know they can trust the macro.
The digital signature is lost after opening the document with Aspose.Word.
Thanks in advance,
Richard Bergmans
Ingenieursbureau van der Linden
The Netherlands
Just by the sound of it I don’t think Aspose.Word will be able to preserve the digital signature. After all, the signature is given to make sure the project has not been tampered with and it is not possible to sign again without the original private key. Also, all this signing is not documented and it is extremely unlikely we at Aspose can support this.
Send me one of you digitally signed files, I will have a look. Maybe there is a simple workaround I can do.
Hi Richard,
I can see the digital signature in the file, but it is undocumented. I will try to preserve it, but no guarantee for now. We have applied to Microsoft to obtain latest file format specs, if we are successfuly maybe it will be possible to deal with the signature then.
In general, are you happy with how Aspose.Word fits into your solution? Any other problems or obstacles you see or foresee?
Hi Roman,
First of all, in general we are very happy with how Aspose.Word fits into our solution. We think it’s a great product.
The only problems or obstacles we see are security issues in combination with the vba projects. But we are confident there will be a solution for it in the future.
One other issue we ran into is for example. When I protect a document so only form fields can be filled in, the document can not be unprotected after we opened it with Aspose. The same problem when I protect the vba project with a password.
These are two little issues, and on the other hand. The faillure of unprotecting an opened document is the best security
With regards,
Richard Bergmans
You mean the document was protected in MS Word, not using Aspose.Word and after passing through Aspose.Word you cannot unprotect?
I’ll check if Aspose.Word damages the password.
Hi Roman,
Sorry, I wasn’t clear about that. I protected the document in MS Word and after passing through Aspose.Word I can’t unprotect it anymore.
Regards,
Richard Bergmans
Hi Roman,
Have you found if the password which is set from ms word for protecting the document is damaged by aspose ?
With regards,
Richard Bergmans
Hi Richard,
Sorry it took longer than expected. I’m about to cover this issue when I’m soon working on a related feature. Should be some progress by the end of this week.
Hi Roman,
I’ve read the preservation of the digital signature. It’s great and I am going to try it out of course.
Thanks a lot,
Richard Bergmans
Ingenieursbureau van der Linden
The Netherlands
Hi,
I am currently evaluating this nice product and I am wondering how it is possible to launch macro’s at specific time.
For instance, my application grabs data from the database and update the word document, launches a macro, update the database, grabs data again and run a mailmerge.
In addition, where I can find documentation about the use of the macro with Aspose.Word.
Thanks in advance,
Franck
Hi,
Thanks for your request. Sorry but Aspose.Word does not allow to run macros. Aspose.Word is “safe” in that it is not affected by macro viruses.