Ms word storyranges
The following code is based directly on that in Public Sub AllStoryRanges()Dim rngStory As RangeDiReturns a 32-bit integer that indicates the application in which the specified object was created.Namespace:Microsoft.Office.Interop.WordAssembly: Microsoft.Office.Interop.Word (in Microsoft.Office.Interop.Word.dll). For example, Microsoft Word has the creator code MSWD. For additional information about this property, consult the language reference Help included with Microsoft Office Macintosh Edition.
NameDescriptionApplicationReturns aApplication object that represents the Microsoft Word application.CountReturns the number of items in the specified collection.CreatorReturns a 32-bit integer that indicates the application in which the specified object was created.ItemReturns a single story of a range or selection as aRange object.ParentReturns an object that represents the parent object of the specified object.Top.
DocumentStoryRangesRangeMultiple objectsA collection of Rangeobjects that represent stories in a document. Using the StoryRanges CollectionUse the StoryRanges property to return the StoryRanges collection. The following example removes manual character formatting from the text in all stories other than the main text story in the active document.
The number of stories in the StoryRanges collection is finite.Use StoryRanges( index), where index is a WdStoryType constant, to return a single story as a Range object. The following example adds text to the primary header story and then displays the text. For Each aStory In ActiveDocument.StoryRangesIf aStory.StoryType wdMainTextStory Then aStory.Font.ResetNext aStoryThe Add method is not available for the StoryRanges collection.
The number of stories in the StoryRanges collection is finite.Use StoryRanges(Index), where Index is a WdStoryType constant, to return a single story as a Range object. If Act.