Quantcast
Channel: NPOI
Viewing all articles
Browse latest Browse all 1621

New Post: Adding headers to Word documents

$
0
0
I have an application that spits out formatted Word documents. I'm trying to edit the headers, but haven't been able to do it. Is anyone able to help?

Here's the code so far, where pHeader is the XWPFParagraph in the document I want to add:

Dim hfpPolicy As New XWPFHeaderFooterPolicy(doc)
hfpPolicy.CreateHeader(NPOI.OpenXmlFormats.Wordprocessing.ST_HdrFtr.default)

but I get an object reference not found. Any help would be greatly appreciated.

Viewing all articles
Browse latest Browse all 1621

Trending Articles