toc | R Documentation |
This function returns information about the table of contents or organization of the sections in the specified Word document.
toc(file, ...)
file |
the docx file, either a string or an object of class WordArchive |
... |
additional parameters for the methods. |
A character vector giving the "titles" of each section found. The level of each section is provided via the attribute named levels. The class of this object is an S3 class named DocumentTableOfContents.
Duncan Temple Lang duncan@wald.ucdavis.edu
# Sample Table of Contents
# This illustrates extracting the table of contents from a sample
# document that has several Heading 1, 2 and 3 styles.
f = system.file("SampleDocs", "toc.docx", package = "RWordXML")
doc = wordDoc(f)
tt = toc(doc)
tt
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.