View Single Post
 
Old 01-26-2019, 01:46 PM
Marzio Marzio is offline Windows 10 Office 2016
Novice
 
Join Date: Jan 2019
Posts: 7
Marzio is on a distinguished road
Default run-time error 4605 command not available with Selection.paste

HI,

i have a table with 1 row and 3 column

Like this

[#Des2] [#Prz] [#Imp]

This macro return the error "run-time error 4605" "Command not available"

If i continue the macro ends correctly

Code:
Sub Macro4()

    Selection.Find.ClearFormatting

    With Selection.Find

        .Text = "[#Des2]"

        .Replacement.Text = "1998-11-27"

        .Forward = True

        .Wrap = wdFindContinue

        .Format = False

        .MatchCase = False

        .MatchWholeWord = False

        .MatchWildcards = False

        .MatchSoundsLike = False

        .MatchAllWordForms = False

    End With

    Selection.Find.Execute

    Selection.EndKey Unit:=wdLine, Extend:=wdExtend

    Selection.EndKey Unit:=wdLine, Extend:=wdExtend

    Selection.EndKey Unit:=wdLine, Extend:=wdExtend

    Selection.Copy

    Selection.MoveDown Unit:=wdLine, Count:=1

    Selection.PasteAppendTable

End Sub
The error happens only with word 2016 with other version is all OK

Regards

Marzio
Reply With Quote