Copy link to clipboard
Copied
Is there a way I can OPEN an MS Word document with CF? I don't want to CREATE one, but only open one that exists already (then let its Autoexec function do a whole lot of stuff with the document).
Thanks. -Dale
Copy link to clipboard
Copied
Yes, but it all depends on what you want ColdFusion to do with the .doc or .docx file. You can open an MS Word document in ColdFusion. In ColdFusion, rather than with ColdFusion. So, don't expect ColdFusion to run macros.
In ColdFusion, you could then use the Apache POI library, for example, to process MS Word documents. That is what Raymond Camden did over 10 years ago.
https://www.raymondcamden.com/2009/02/04/Reading-Office-documents-with-ColdFusion
Copy link to clipboard
Copied
Copy link to clipboard
Copied
You could try something like:
<cfexecute name="C:\Windows\System32\cmd.exe"
arguments="/c absolute-path-to-winword.exe absolute-path-to-SampleWordDoc.docx">
</cfexecute>