A
Alan
If this sounds like a beginner question please forgive me, but alas, I
am a beginner. What I need to do is copy a bit of text in one document,
open another document, then search for that text there.
Everything works find except the actual pasting of the text into the
find dialog box. after creating a macro this is what I get.
Sub Macro1()
Selection.Find.ClearFormatting
With Selection.Find
.Text = "sample"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindAsk
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
End Sub
Is there something I substitute ".Text = "sample"" for that would paste
a selection instesd of static text into this box? I noticed that most
times that simply copying text will automatically place that text into
the box, but not always.(???) I have a suspicion that the answer lies in
a DIM statement but I've never used these. If someone could show me an
example of that I would much appreciative(and I could stop puling my
hair out) Tia Alan
am a beginner. What I need to do is copy a bit of text in one document,
open another document, then search for that text there.
Everything works find except the actual pasting of the text into the
find dialog box. after creating a macro this is what I get.
Sub Macro1()
Selection.Find.ClearFormatting
With Selection.Find
.Text = "sample"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindAsk
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
End Sub
Is there something I substitute ".Text = "sample"" for that would paste
a selection instesd of static text into this box? I noticed that most
times that simply copying text will automatically place that text into
the box, but not always.(???) I have a suspicion that the answer lies in
a DIM statement but I've never used these. If someone could show me an
example of that I would much appreciative(and I could stop puling my
hair out) Tia Alan