VBA Excel到Word粘贴包括粘贴文本后的新行
我正在尝试将单元格文本粘贴到word文档上的书签位置。当我这样做时,它会在新粘贴的文本后添加一行新行。我怎样才能摆脱这个?我在用电话VBA Excel到Word粘贴包括粘贴文本后的新行,vba,excel,ms-word,Vba,Excel,Ms Word,我正在尝试将单元格文本粘贴到word文档上的书签位置。当我这样做时,它会在新粘贴的文本后添加一行新行。我怎样才能摆脱这个?我在用电话 PasteAndFormat (wdFormatSurroundingFormattingWithEmphasis) 试试这个:- 书签将被重写,无法再次使用。如果需要保留,请捕获包含新文本的区域,并重置指向该区域的书签 Txt = "My cell value as string" With ActiveDocument .Bookmarks("Mar
PasteAndFormat (wdFormatSurroundingFormattingWithEmphasis)
试试这个:-
书签将被重写,无法再次使用。如果需要保留,请捕获包含新文本的区域,并重置指向该区域的书签
Txt = "My cell value as string"
With ActiveDocument
.Bookmarks("Mark").Range.Text = Txt
End With