Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #7  
Old 10-14-2022, 11:10 PM
laith93 laith93 is offline Applying a VBA code to current paragraph without being selected Windows 10 Applying a VBA code to current paragraph without being selected Office 2019
Competent Performer
Applying a VBA code to current paragraph without being selected
 
Join Date: Jul 2021
Posts: 117
laith93 is on a distinguished road
Default

Quote:
Originally Posted by gmayor View Post
Selection.Paragraphs(1) will work. There is no need to select the paragraph. You do however have to stop the search when the range has been processed.
Wow Wow Wow

It works perfectly, although I changed the Rng to Selection.Paragraphs(1).Range, but doesn't work previously.
However, I think it requires restarting Word, but when I used your code, it works directly.

Thanks, Thanks Thanks my bro
You are the magic man
Reply With Quote
 

Tags
find & replace, word 19, word vba



Similar Threads
Thread Thread Starter Forum Replies Last Post
Applying a VBA code only on a selected table RobertDany Word VBA 5 10-25-2021 09:28 PM
Applying a VBA code only on a selected text or range RobertDany Word VBA 2 10-09-2021 08:31 AM
Applying a VBA code to current paragraph without being selected applying heading style within paragraph using macro cheech1981 Word 8 08-23-2017 03:07 PM
Applying a VBA code to current paragraph without being selected Applying style to first part of paragraph foxtrot Word 3 07-24-2012 07:30 AM
Does Word do this when applying Styles to a paragraph a second time? Bobosmite Word 2 04-17-2012 02:13 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 12:51 PM.


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