Link to home
Start Free TrialLog in
Avatar of Alex Campbell
Alex CampbellFlag for United States of America

asked on

Need Word Macro to Find and Change Entire Line to Style

Need a macro that would find Sub in the below example, highlight the rest of line (it can include the word Sub) and then
change the style to Heading 2.  It need it to run until it reaches the end of the document.

Sub InsertPics()
 Dim fd As FileDialog
 Dim rng As Range
 Dim ilsh As InlineShape
ASKER CERTIFIED SOLUTION
Avatar of Helen Feddema
Helen Feddema
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
The .dotm extension wasn't accepted; I tried using a zip file with it inside, but that was rejected too.  If you want the template emailed to you, send me a message with your email.
you can use ee-stuff.com to upload blocked files using your E-E creds to login: https://www.ee-stuff.com/

To upload:
select Experts Area ―> Upload a new file ―> Question or Article URL ―> upload file

To download:
select Experts Area ―> Find files for a question ―> Question URL ―> download file
I uploaded the template to ee-stuff.
Here is a screen shot of a page of formatted code:

User generated image
Avatar of Alex Campbell

ASKER

Very good. Thanks