Click to See Complete Forum and Search --> : Asp and MS Word


jriell
05-13-2003, 05:17 PM
I am trying to paste content into a Word document but cannot get the content to paste in the correct location.

I want to paste from the clipboard at the end of the current docuement. This process of pasting is running in a loop so the end of the document is constantly changing. I am trying to use the GoTo method yet it is not working. Here is the syntax I am currently using:

Set tempDoc = Template.Documents.Open(ScheduleName)
Set TempRange = tempDoc.Bookmarks("ScheduleEnd").Range
tempDoc.Range.Copy

i = 1
Do Until SRS.EOF
TempRange.Paste

'**This line is erroring out on me.**
Set QuoteRange = TempRange.GoTo(wdGoToPage, wdGoToLast)

SRS.MoveNext
Loop

What am I doing wrong? Is this the correct syntax? I have tried many different combinations of this and it still doesn't work.