1
votes

H ey folks,

I am in dire need of the functionality to insert my clipboard contents BEFORE a MS Word documents bookmark.

Googling this issue didn't turn up anything usable, so I hope that someone can help me here.

Basically what I do is the following:

.Tables(1).Range.Copy

This copies the first table of my document to the clipboard.

Now I would be able to insert this data with

.bookmarks("AH_Tab").Range.Paste

however, this is not viable because I will execute the VBA code several times (like on different days, etc.) and I always want to paste the table to the top.

So what I would need is basically a

Range.InsertBefore (.Paste)

functionality. This way I would kinda build up a stack of tables behind that bookmark, with the newest one always at the top.

Does anyone know of a command that is able to achieve this?

best regards, daZza

1

1 Answers

0
votes

Try with the similar logic which I presented in the other question of yours:

With doc

    .Range( _
        .Bookmarks("AH_Tab").Start - 1, _
        .Bookmarks("AH_Tab").Start - 1).Paste

End With