Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 05-31-2017, 06:28 AM
cheech1981 cheech1981 is offline applying heading style within paragraph using macro Windows 7 64bit applying heading style within paragraph using macro Office 2010 64bit
Advanced Beginner
applying heading style within paragraph using macro
 
Join Date: Nov 2011
Location: New Jersey, USA
Posts: 77
cheech1981 is on a distinguished road
Default applying heading style within paragraph using macro

Hi all,

I have a macro that moves a freestanding heading to an in-line heading. At the end of the macro, I would like to apply a heading style--for the sake of example, let's say Heading 4.


Example of finished text would be:



Some example heading. Paragraph text begins on same line...


I would like the macro to apply the Heading 4 style to the text "Some example heading" (not including the period). However, when I record this action with the macro recorder and then later try to run the macro, it seems that Word is unable to apply a heading style to a selected portion of text within a line. Is there a way to force this in the VBA code to work around Word's limitation with the macro recorder?
Reply With Quote
 

Tags
heading styles, macro, recorder



Similar Threads
Thread Thread Starter Forum Replies Last Post
Applying heading style to multiple pages at once jane.bugai Word 5 02-24-2017 04:05 PM
applying heading style within paragraph using macro Using heading style level in a paragraph kam Word 7 03-24-2014 02:58 PM
applying heading style within paragraph using macro Macro to replace one specific heading style with another ubns Word VBA 44 09-04-2012 08:17 PM
applying heading style within paragraph using macro Applying style to first part of paragraph foxtrot Word 3 07-24-2012 07:30 AM
Character style stripped while applying paragraph style sams_gates Word 0 08-29-2009 02:03 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 07:29 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft