Footnotes.vb
- ''
- '' This code is part of Document Solutions for Word demos.
- '' Copyright (c) MESCIUS inc. All rights reserved.
- ''
- Imports System.IO
- Imports System.Drawing
- Imports GrapeCity.Documents.Word
-
- '' Shows how to add and format footnotes.
- Public Class Footnotes
- Public Function CreateDocx() As GcWordDocument
- Dim doc = New GcWordDocument()
-
- Dim pars1 = doc.Body.Paragraphs
-
- Dim p1 = pars1.Add("Section 1, Paragraph 1. " + LoremIpsumPar())
- p1.GetRange().Footnotes.Add("This is footnote 1 for Section 1, Paragraph 1.")
- p1.GetRange().Footnotes.Add("This is footnote 2 for Section 1, Paragraph 1.")
-
- Dim p2 = pars1.Add("Section 1, Paragraph 2. ")
- p2.GetRange().Runs.Add(LoremIpsumPar()).GetRange().Footnotes.Add(
- "This is a footnote for the last run in Section 1, Paragraph 2.")
-
- pars1.Add("Section 1, Paragraph 3. " + LoremIpsumPar())
-
- '' Done
- Return doc
- End Function
- End Class
-