Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Paste text into word from excel

Status
Not open for further replies.

ChuckBFL

Programmer
Apr 4, 2001
2
US
I am using the code below to search for a field and paste a block of text. This will paste over the text that I am searching for, how can i add text to the line after what I am searching for.



Set objRange = _ objWordDoc.ActiveWindow.Document.RangeStart:=0, End:=0)
With objRange.Find
.ClearFormatting
.Text = FieldToPasteOver
.Execute , Format:=True, MatchCase:=False, MatchWholeWord:=False
End With
With objRange
.Paste
For i = 1 To .Tables.Count
.Tables(i).ConvertToText " "
Next
End With
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top