Word365 Doc.Activate and Paste range from other document
Hi
I recently changed to 365. Ik have a macro that opens a second document and copies blocks of information to the orginal document. The user can select with informtion he wants to paste
I get a 4605 error message now.
My code is
Code:
Documents(OriDoc).Activate
Selection.Move Unit:=wdCell, Count:=1
Set SrcRng = Documents(OpenFile).Sections(4).Range
SrcRng.Select
SrcRng.MoveEnd wdCharacter, -1 'Alles selecteren behalve Sectie-einde
SrcRng.Copy
Documents(OriDoc).Activate
Selection.Paste
Before this code a table is inserted from a building block. The original document is activated and the cursor is moved to the correct cell. Then the source doc is opened, and a section is copied.
The Oridoc is activated again and the contents is pasted
The error message occurs on "Selection.Paste"
The strange behavior is that when i press error detection (i do not know the correct translatation form this out of Dutch, but it is the most right button in the errordialog) en then press CTRL-SHIFT-F8 to step over , then contents is nicely pasted as i want it....
Before 365 this error did not occur....