We are a software house based in London, England. We develop application using VB.NET (for windows) and ASP.NET (for web) and one of the requirements we have is generating standard template letters from data held within our system. Currently, we use MS Word. This is used to create the master template with mergefields and then during execution under program control we retrieve the data from our database, open and merge the relevant master template and then print it using Word Macros.
We want to replicate this functionality using a 3rd party tool rather than MS Word. We are happy to use MS Word to create the master templates but the rest we want to do using another tool.
Can you please let me know whether Aspose.Words can do the above? Key elements are open and mergings .doc or .docx files created by MS Word and also utilising the word macros.
Thank you for your reply. However, it does not answer my two questions directly:
Can Aspose.Words read a .doc or .docx file that has been created by MS Word with mergefieds without any modifications? What we want to do is let our Admin users use MS Word to create and modify the master templates but when users are using it, we want to use Aspose.Words to open the MS Word created .doc or .docx, merge it and then print it
As regards printing, from what you have indicated, it appears the Aspose.Words cannot use the macro facility within MS Word. In other words, we cannot open a .doc or .docx in Aspose.Words and say printing using MS Word macro xyz. Am I correct?
As we are trying to retro fit a 3rd party component to an existing application, we need to understand the amount of work we need to do within our application and new functionality we need to add as regards printing etc. At present, our end users can create new macros which can have 1st page from Tray 2 and then subsequent pages from Tray 1, or print document ABC from printer 3 on tray1 etc without us getting involved as they or their IT dept can write the relevant MS Word macros
Thanks for your request and sorry for pure answer.
Yes, of course, you can use existing MS Word document as templates. Aspose.Words supports wide set of document formats, like DOC, DOCX, RTF, WML etc. you can open any of these document formats using Aspose.Words and use it as a template. Please LoadFormat enumeration to learn import of which file formats supported by Aspose.Words: https://reference.aspose.com/words/net/aspose.words/loadformat/
And SaveFormat enumeration to learn export to which formats is supported: https://reference.aspose.com/words/net/aspose.words/saveformat/