Macro to delete headings in Word -
I have a WORD document that has many H1 headings, I want a macro that gives me a specific H1 heading Allow the content to be removed until the next H1 heading - Essentially removing the H1 section, so I would like to remove from H2 heading to the next H1 or H2 heading.
You can define the style of paragraph using oParagraph.Style (where oParagraph is a paragraph object) Are there. So, you can do something like this:
Paragraph set paragraph of the oSTartHeading paragraph = selection. Paragraph (1) If oSTartHeadingParagraph.Style & lt; & Gt; "Heading 1" then MSBBC "Please select the heading 1 paragraph for the section that you want to delete." Paragraph sets are used in the form of OperaGraph = OstaatHiding paragraphs, while OperaGraph = ostiming paragraphs, while osthastiding paragraphs. There is nothing next if osthastiding paragraphs next. Style = "heading 1" then exit or otherwise exit the paragraph. Next. Range. Finish the dip if loop ostising paragraph Range. Delete &
Comments
Post a Comment