J
Joacim
Hi,
Runtime error 4605 this method or property is not available
I recorded this macro (keystrokes). Debug goes to Selection.Copy
Then I did CTRL C CTRL END CTRL Enter CTRL V
To insert the highlighted select variables in [ ] and place at end of
document.
What do I need to do to continue after the End With to make Selection.Copy
function?
Option Explicit
Sub SelectVariables()
'
' SelectVariables Macro
' Macro recorded 10/09/2006
'
Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
With Selection.Find
.Text = "\[*\]"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
**Selection.Copy Selection.EndKey Unit:=wdStory
Selection.InsertBreak Type:=wdPageBreak
Selection.PasteAndFormat (wdPasteDefault)
End Sub
Runtime error 4605 this method or property is not available
I recorded this macro (keystrokes). Debug goes to Selection.Copy
Then I did CTRL C CTRL END CTRL Enter CTRL V
To insert the highlighted select variables in [ ] and place at end of
document.
What do I need to do to continue after the End With to make Selection.Copy
function?
Option Explicit
Sub SelectVariables()
'
' SelectVariables Macro
' Macro recorded 10/09/2006
'
Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
With Selection.Find
.Text = "\[*\]"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
**Selection.Copy Selection.EndKey Unit:=wdStory
Selection.InsertBreak Type:=wdPageBreak
Selection.PasteAndFormat (wdPasteDefault)
End Sub