(Solved) – VBA O365 Mac Excel copy and Word PasteSpecial with links = True problem

(solved)-–-vba-o365-mac-excel-copy-and-word-pastespecial-with-links-=-true-problem

Im on Excel 16.32 and Im rewriting old windows VBA to convert it for Mac use instead (want to close our terminal server).

I have no problem with open and save files (sandboxing) and have got the most working but the big issue is that I can’t get the pastespecial with link:=true to work.

Excel – copy cell/range – in this case cell B2.
Word – paste it in bookmark ”FastBetRubr” with link so it can be updated if needed.

So:

myDoc.Bookmarks.Item(“FastBetRubr”).Range.PasteSpecial DataType:=wdPasteText, Placement:=wdInLine, DisplayAsIcon:=False, Link:=False

Is working

But:
myDoc.Bookmarks.Item(“FastBetRubr”).Range.PasteSpecial DataType:=wdPasteText, Placement:=wdInLine, DisplayAsIcon:=False, Link:=True

Is not working and gives a 5345 error (no use error code).

We really need the links and if I make a break-point and then paste-special in word it works. It also works if just tries to paste-special normally.

The files is on a SMB share and I have tried to save both documents before pastespecial and without saving – no change.

Is this still a sandboxing error or is the Excel-Word pasting not working in Mac O365?

Leave a Reply

Your email address will not be published. Required fields are marked *