Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 05-18-2020, 10:34 AM
eduzs eduzs is offline One line find execute in this case is possible? Windows 10 One line find execute in this case is possible? Office 2019
Competent Performer
One line find execute in this case is possible?
 
Join Date: May 2017
Posts: 178
eduzs is on a distinguished road
Default One line find execute in this case is possible?

Is that possible to modify those lines to a single line find.execute command?


Thanks

Code:
With Activedocument.StoryRanges(wdMainTextStory).Find
    .Text = "Hi there*Here"
    With .Replacement
        .Text = "^&"
        .Font.Size = 11
    End With
    .Wrap = wdFindContinue
    .Format = True
    .MatchWildcards = True
    .Execute Replace:=wdReplaceAll
End With
__________________
Backup your original file before doing any modification, test in a throwaway copy of your file.
Reply With Quote
  #2  
Old 05-18-2020, 10:52 AM
gmaxey gmaxey is offline One line find execute in this case is possible? Windows 10 One line find execute in this case is possible? Office 2016
Word MVP 2003-2009
 
Join Date: May 2010
Location: Marble, NC
Posts: 1,034
gmaxey will become famous soon enoughgmaxey will become famous soon enough
Default

No it is not.
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
One line find execute in this case is possible? VBA to convert a line of text to title case jeffreybrown Word VBA 14 09-09-2019 05:37 AM
One line find execute in this case is possible? How to avoid find.execute moving focus and restore exact view after search diracsbracket Word VBA 3 10-30-2016 03:17 AM
One line find execute in this case is possible? Find incorrect upper case while leaving correct ones? WaltR Word 2 02-23-2015 09:09 PM
How do I convert a line of text to title case? neilfxb Word 3 02-13-2015 07:00 AM
One line find execute in this case is possible? Find and Execute cksm4 Word VBA 1 10-22-2011 11:36 PM

Other Forums: Access Forums - Senior Forums

All times are GMT -7. The time now is 01:16 AM.


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