![]() |
|
#1
|
|||
|
|||
![]()
As a simple variant:
Code:
Sub Test() Dim oRng As range Dim vWd As Variant Dim vHi As Variant Set oRng = ActiveDocument.range With oRng.Find .ClearFormatting .Replacement.ClearFormatting .text = "width=^#^#^#" .Replacement.text = "" .MatchWildcards = False .Forward = True .Wrap = wdFindStop If .Execute Then vWd = oRng End With Set oRng = ActiveDocument.range With oRng.Find .text = "height=^#^#^#" If .Execute Then vHi = oRng End With With ActiveDocument.range.Find .text = "\<" & "img width" & "*" & "\>\<" .MatchWildcards = True .Execute Replace:=wdReplaceAll End With MsgBox vWd & vbCr & vHi lbl_Exit: Set oRng = Nothing End Sub |
![]() |
Thread Tools | |
Display Modes | |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to hide/delete slides based on keyword in a separate text file based on AND|OR condition? | rupd911 | PowerPoint | 0 | 02-22-2021 08:22 AM |
![]() |
commissarmo | Word VBA | 3 | 03-14-2015 12:53 AM |
![]() |
officeboy09 | Word | 6 | 09-26-2014 05:15 PM |
![]() |
subodhgupta | Word | 4 | 05-22-2014 03:34 AM |
![]() |
vikrantkale | Word | 1 | 03-28-2011 06:13 PM |