A
Alcide
Hello All,
I am working on a Macro to delete double spaces on a Publisher Document. The
Macro is below (shamelessly copied from Microsoft's help site, with minor
changes).
Option Explicit
Dim objDocument As ThisDocument
Sub KillDblSpaces()
For Each objDocument In ThisDocument
With objDocument.Find
.Clear
.MatchCase = True
.FindText = "^w^w"
.ReplaceWithText = "^w"
.ReplaceScope = pbReplaceScopeAll
.Execute
End With
Next objDocument
End Sub
It compiles but doesn't work. I get the following error:
"Object doesn't support this property or method"
I suspect that I am misapplying the ThisDocument object. Any ideas on this?
Thanks in advance for your support.
I am working on a Macro to delete double spaces on a Publisher Document. The
Macro is below (shamelessly copied from Microsoft's help site, with minor
changes).
Option Explicit
Dim objDocument As ThisDocument
Sub KillDblSpaces()
For Each objDocument In ThisDocument
With objDocument.Find
.Clear
.MatchCase = True
.FindText = "^w^w"
.ReplaceWithText = "^w"
.ReplaceScope = pbReplaceScopeAll
.Execute
End With
Next objDocument
End Sub
It compiles but doesn't work. I get the following error:
"Object doesn't support this property or method"
I suspect that I am misapplying the ThisDocument object. Any ideas on this?
Thanks in advance for your support.