rotmagic.blogg.se

Close header and footer in word
Close header and footer in word












close header and footer in word

Using wordProcessor As New RichEditDocumentServer()ĭim document As Document = wordProcessor.Documentĭim firstSection As Section = document.Sections(0) SubDocument headerDocument = firstSection.BeginUpdateHeader() įirstSection.EndUpdateHeader(headerDocument) If (!firstSection.HasHeader(HeaderFooterType.Primary)) Check whether the document already has a header (the same header for all pages). Section firstSection = document.Sections Using (RichEditDocumentServer wordProcessor = new RichEditDocumentServer())ĭocument document = wordProcessor.Document

The code sample below creates an empty document header: Use the following API to access headers and footers in code: APIĪccesses the document’s header or footer.Ĭhecks whether the given section contains a header or footer. Pass one of the HeaderFooterType enumeration values as a type parameter to define the header or footer’s type. You can use the Section.BeginUpdateHeader and Section.BeginUpdateFooter methods to access the section’s header or footer. When you create a new section, it is automatically linked to the previous section and the content from the first section header is automatically inserted in the second section header. If a section does not have header or footer, the previous section’s header and footer (if any) are used. Headers and footers belong to document sections.














Close header and footer in word