View Single Post
 
Old 07-12-2011, 04:37 PM
chipnputt chipnputt is offline Windows Vista Office 2007
Novice
 
Join Date: Jul 2011
Posts: 5
chipnputt is on a distinguished road
Default Stop multiple pastes at bookmark

I have been working with VBA in Access, Excel and currently Word. I have an excel spreadsheet that is used to organize golfing foursomes on a daily basis. From here I export the necessary data to a word document and then transfer that doc through FTP to the Associations web site. I use the following code to[code]
With ActiveDocument
'Identify current Bookmark range and insert text
If .Bookmarks.Exists(BmkNm) Then
.Bookmarks(BmkNm).Range.PasteSpecial Link:=False, DataType:=wdPasteHTML, _
Placement:=wdInLine, DisplayAsIcon:=False
End If
End With
This code works but the second time it is run, the information is added after the last paste. I have searched for a way to delete the previous information if any and then paste the text to no avail. Any suggestions would be appreciated.
Reply With Quote