Link to home
Start Free TrialLog in
Avatar of Courtney Courtney
Courtney Courtney

asked on

Macro for deleting paragraphs

I would like to create a Macro in MS Word, 2013 that, when run, deletes any line or paragraph that begins with "I:"  I would also like to replace all paragraphs with this with "*".
Does anyone have a code?  Thank you so much!
Avatar of GrahamSkan
GrahamSkan
Flag of United Kingdom of Great Britain and Northern Ireland image

You can do this with a wildcard Find and Replace. No VBA code is necessary.

Open the dialogue with Ctrl+H.

Click the 'More>>' button and tick the 'Use wildcards' checkbox.

Type (without the quotes) "I:*^13" in the 'Find what:' box and "*^p" in the 'Replace with:' box.

Click  'Replace All'
This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.