Configurable script location

16 views
Skip to first unread message

Jason Harrop

unread,
Mar 16, 2020, 7:17:25 PM3/16/20
to documents4j
Hi there,

I wrote a couple of blog posts on using documents4j with Word documents.  


https://www.docx4java.org/blog/2020/03/documents4j-for-toc-update/ explains how to use documents4j to update a TOC in a docx file.

But to do that, you need to customise word_convert.vbs, and either overwrite the existing one in the jar, or ensure it appears earlier on your classpath: https://stackoverflow.com/a/51812774/1031689 https://stackoverflow.com/a/58578088/1031689

Could we consider other ways to override/customise word_convert.vbs for example by passing MicrosoftOfficeScript object (which is really just a File) into the fluent converter builder, or perhaps better, a new convert(File source, MicrosoftOfficeScript script) method in interface IConverter

thanks .. Jason


Rafael Winterhalter

unread,
Mar 17, 2020, 5:04:07 AM3/17/20
to Jason Harrop, documents4j
Very cool, thanks for sharing.

Would you consider a pull request? I see how this can be useful, also for debugging purposes.

Best regards, Rafael

--
You received this message because you are subscribed to the Google Groups "documents4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email to documents4j...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/documents4j/daa7dd2f-f783-4352-b282-7f63722121b4%40googlegroups.com.

jha...@gmail.com

unread,
Mar 23, 2020, 5:32:37 AM3/23/20
to Rafael Winterhalter, documents4j
Hi Rafael, I'm working on a PR, its nearly done.  I'll let you know.  cheers .. Jason

Jason Harrop

unread,
Mar 24, 2020, 3:00:42 AM3/24/20
to documents4j


On Monday, March 23, 2020 at 8:32:37 PM UTC+11, Jason Harrop wrote:
Hi Rafael, I'm working on a PR, its nearly done.  I'll let you know.  cheers .. Jason

On Tue, Mar 17, 2020 at 8:04 PM Rafael Winterhalter  wrote:
Very cool, thanks for sharing.

Would you consider a pull request? I see how this can be useful, also for debugging purposes.

Best regards, Rafael

Am Di., 17. März 2020 um 00:17 Uhr schrieb Jason Harrop :
Hi there,

I wrote a couple of blog posts on using documents4j with Word documents.  


https://www.docx4java.org/blog/2020/03/documents4j-for-toc-update/ explains how to use documents4j to update a TOC in a docx file.

But to do that, you need to customise word_convert.vbs, and either overwrite the existing one in the jar, or ensure it appears earlier on your classpath: https://stackoverflow.com/a/51812774/1031689 https://stackoverflow.com/a/58578088/1031689

Could we consider other ways to override/customise word_convert.vbs for example by passing MicrosoftOfficeScript object (which is really just a File) into the fluent converter builder, or perhaps better, a new convert(File source, MicrosoftOfficeScript script) method in interface IConverter

thanks .. Jason


--
You received this message because you are subscribed to the Google Groups "documents4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email to documents4j+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages