Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 06-24-2016, 09:07 AM
Ajay2506 Ajay2506 is offline Finding the graphics and inserting the keyword Windows 7 64bit Finding the graphics and inserting the keyword Office 2013
Novice
Finding the graphics and inserting the keyword
 
Join Date: Jun 2016
Posts: 8
Ajay2506 is on a distinguished road
Default Finding the graphics and inserting the keyword

Hi,

I am looking for some help in writing the vba macro to find all the figures in the word document and insert a line just above the each graphics in the work document.



Sub Macro1()
'
' Macro1 Macro
'
'
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "^g"
'.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub

Like in this code it is able to find all the graphics but we dont want to replace the graphics, we want to keep them and add the line.



Thanks in advance.
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Finding the graphics and inserting the keyword Summarize keyword into word document simba24d Word 3 06-10-2016 02:28 PM
Finding the graphics and inserting the keyword Multiple keyword search in WORD tvincent8118 Word VBA 1 06-23-2015 04:45 AM
VBA find keyword and move to location then add symbol Jmanville Word VBA 3 10-22-2014 01:45 AM
Finding the graphics and inserting the keyword Problem with Inserting Power-Point Graphics into Word Don83 Word 4 03-12-2014 02:19 AM
Finding the graphics and inserting the keyword Find keyword in section & delete section donaldadams1951 Word VBA 5 12-03-2013 10:08 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 06:26 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