Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

programmatically creating footnotes in docx

0 views
Skip to first unread message

SunWuKung

unread,
Oct 30, 2006, 4:30:01 AM10/30/06
to
The docx file I am creating with an external template engine contains text
where each sentence may have a footnote. My problem is that in the docx
footnotes are stored in footnotes.xml and than referenced in document.xml.
This makes creating footnotes programmatically quite difficult.

In OpenOffice I could do this with a single cycle:
.......some text here......
.......footnote for some text.........
'<text:note text:id="ftn0"
text:note-class="footnote"><text:note-citation>1</text:note-citation><text:note-body><text:p
text:style-name="Footnote">....footnote text
....</text:p></text:note-body></text:note>'
.....text continues.......

That's it. I can generate the text with footnotes with a single cycle from
the database. When there is a footnote all I need to do here is insert the
above chunk with the footnote text replaced.

I started to look for things like cfchunk for the docx but it didn't lead
enywhere.
Is there an easier way to store footnotes in document.xml?

Thanks for the help.
SWK

0 new messages