J
John
Hi
I tried, and failed to create a macro.
(I do a procedure hundreds of times every day so wanted to automate
it)
I press Control-F (to open the 'find' dialogue) and then press Control-
V (to paste the contents) into the dialogue. As you can see from the
code below, when I recorded the macro, it used '2022' (which is what
happens to be in my clipboard right now) but I want it to use the
clipboard.
Is this possible? I hope I've explained the problem properly.
====================================================
Sub FindWhatsinClipboard()
'
' FindWhatsinClipboard Macro
' Macro recorded 26/03/2010 by John Smith
'
Selection.Find.ClearFormatting
With Selection.Find
.Text = "2202"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindAsk
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
Selection.Find.ClearFormatting
With Selection.Find
.Text = "2202"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindAsk
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
End Sub
I tried, and failed to create a macro.
(I do a procedure hundreds of times every day so wanted to automate
it)
I press Control-F (to open the 'find' dialogue) and then press Control-
V (to paste the contents) into the dialogue. As you can see from the
code below, when I recorded the macro, it used '2022' (which is what
happens to be in my clipboard right now) but I want it to use the
clipboard.
Is this possible? I hope I've explained the problem properly.
====================================================
Sub FindWhatsinClipboard()
'
' FindWhatsinClipboard Macro
' Macro recorded 26/03/2010 by John Smith
'
Selection.Find.ClearFormatting
With Selection.Find
.Text = "2202"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindAsk
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
Selection.Find.ClearFormatting
With Selection.Find
.Text = "2202"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindAsk
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
End Sub