Hi there,
I have made a repository of templates and some MS Word macros that ensure docs are fine and fill content (using bookmarks).
Our templates are parent-child associated, meaning anyone can create new templates from the parent template.
For content, I use small raw .txt files containing content and properties (e.g. parent category, language) which I can parse using internal macros. I needed the all system to be available also for external user having no access to macros so I developed a basic online template request form online.
But I failed to finalise direct downloading of the file online. Basically, I need to find a way to launch MS Word server-side or call any available class, XML API, whatever it is, to be able to open an MS Word (or XML zip) file and change defined bookmarks and save in root. I am really not familiar with .net, Visual Studio, Sharepoint BI/APIs/Flow but there must be an MS Word API-kind-of now?
If I can't, a workaround would this... I wrote a .batch file that checks a local directory for .txt files. When I receive a notification email with the .txt request form, the file is saved in the directory and bat is run (I need to code this one on Outlook though). The batch opens MS Word... and macro is run, it parses the .txt file, doc created then send an email to user (Outlook again). This works (I just need to code the macro for Outlook to filter, save the file in directory and call the bat). Almost a full automated process... User will get the file within 2mn max by email instead of direct download.
(sorry poster in general as no idea where to put this, I don't mind post being moved)
Thanks!