Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 01-24-2022, 04:43 PM
exoson exoson is offline Determine Style of paragraph at current location Windows 7 64bit Determine Style of paragraph at current location Office 2010 32bit
Novice
Determine Style of paragraph at current location
 
Join Date: Jan 2014
Posts: 6
exoson is on a distinguished road
Default Determine Style of paragraph at current location

I need to use the paragraph Style at the current location to select what action I need to take.
Another VBA macro will be called based on the style.

E.g., If the Style is "Introduction" then

delete the current paragraph,


'insert some text from the clipboard

Selection.PasteAndFormat (wdFormatPlainText)




' prepare the next paragraph
Selection.Style = ActiveDocument.Styles("Body")


How do I determine the current style?
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Delete the current paragraph by just one click without selecting it RobertDany Word VBA 2 10-10-2021 09:55 PM
Determine Style of paragraph at current location Is there a way programmatically to determine the footnote number style, if other than arabic numbers gn4619 Word VBA 2 11-23-2015 11:00 PM
determine location of object via calculation sarahtalbot Visio 0 01-08-2015 03:27 AM
A macro that moves the current paragraph up or down? New Daddy Word VBA 2 04-13-2014 02:25 PM
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 11:11 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