![]() ' Set the style of the selected range and IntLevel = GetLevel(CStr(astrHeadings(intItem))) ' GetCrossReferenceItems(wdRefTypeHeading) returns an array with references to all headings in the documentĪstrHeadings = docSource.GetCrossReferenceItems(wdRefTypeHeading)įor intItem = LBound(astrHeadings) To UBound(astrHeadings) ' Content returns only the main body of the document, not the headers/footer. GetCrossReferenceItems(wdRefTypeHeading) function is the key in this program, and should allow you to retrieve what you are asking for) Public Sub CreateOutline() You mean like this createOutline function (which actually copy all headings from a source word document into a new word document):
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |