I have a 150 page word file for work that i need to go through. What i would like to do is automate this since i rather not copy and paste all 150 pages.
There are headings 1 2 and 3 in this file. Both Headings 2 and 3 may have body text.
What i need to do is copy the Heading 2 and the body text that follows it and paste it in an excel document for some comparison.
A1 = Title b1 = Description
Heading 2 will goto A1
Body text will goto B1
Here is a macro i have now that will identify if its a Body or Heading style. Where can i go from this to have it copy and paste. By the way i am new to coding VBA
Sub EditFindLoopExample() 'This example inserts "Tip: " at the beginning of ' every paragraph formatted with the Heading 3 style. With ActiveDocument.Content.Find .ClearFormatting .Style = wdStyleBodyText 'The Do...Loop statement repeats a series of ' actions each time this style is found. Do While .Execute(Forward:=True, Format:=True) = True With .Parent 'If the found text is the last ' paragraph in the document... If .End = ActiveDocument.Content.End Then .StartOf Unit:=wdParagraph, Extend:=wdMove .InsertAfter "Tip: " Exit Do 'If the found text is *not* the last ' paragraph in the document... Else . .StartOf Unit:=wdParagraph, Extend:=wdMove .InsertAfter "Here: " .Move Unit:=wdParagraph, Count:=1 End If End With 'Goes back to the beginning of the Do...Loop statement. Loop End With End Sub