Page 1 of 1

Add HTML source files to project?

Posted: Mon Jan 29, 2018 10:20 am
by maryfconnor
In earlier versions of D2H I could add an HTML source file to my project, which let me merge code-generated content into the Help target. The new version isn't letting me do that. Have any of you figured out how to do this? I can open the .D2H project file in MS Access, but I don't know what values to put in:
Image

Re: Add HTML source files to project?

Posted: Tue Jan 30, 2018 7:09 am
by SKamprowski
Hi Mary,

I only know a workaround that still works for XML files with Version 5:
1. create a Word document that has the same file name (except its extension) you want to add as XML file.
2. let Doc-To-Help concert it into an XML file.
3. replace this XML file in your documents folder by the one you want to add.

Re: Add HTML source files to project?

Posted: Tue Jan 30, 2018 8:35 am
by maryfconnor
Yeah, that's as far as got too, but I can't get past the problem of file format (I have to work with HTML, not HTML5/XML, which is not a trivial conversion). :(
My hope was to hack the project file to convince D2H to handle the file as HTML. What I don't know is if D2H5 build code has changed to refuse HTML, or if it's just the UI that has changed (for the worse).

Re: Add HTML source files to project?

Posted: Tue Jan 30, 2018 9:12 am
by SKamprowski
Hi Mary,
here is what I would try in addition to my last suggestion:
open an xml document created by DocToHelp,
copy its meta data and header into the html file you want to add to the D2H Project,
then modify file extension to xml and exchange it with the converted Word document.

Re: Add HTML source files to project?

Posted: Tue Jan 30, 2018 2:42 pm
by maryfconnor
I'm going for an automated solution, as the file will be regenerated on a regular basis.
Looks like this might work: rename api.html to api.doc (not docx), which Word is able to open. D2H will allow us to add *.doc files to projects.

Re: Add HTML source files to project?

Posted: Tue Jan 30, 2018 3:05 pm
by maryfconnor
Rats, no joy. It seems to work fine, but the build fails with no errors in the logs, after all of the cross-refs have been processed in the api.doc file.