View Single Post
 
Old 07-01-2023, 06:45 PM
Guessed's Avatar
Guessed Guessed is offline Windows 10 Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,176
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

You can't copy the complete contents of a cell into a non-table. The complete contents of a cell includes the invisible end-of-cell marker as well as an invisible paragraph mark.

To fix this, try modifying this chunk
Code:
' Copy the first row of the source table
Set sourceText = sourceRow.Cells(2).Range   'Note I removed the formattedtext from here
sourceText.End = sourceText.End - 1   'or 2 if you don't want the paragraph mark either
' Add the new paragraph
targetText.Collapse Direction:=wdCollapseEnd
targetText.FormattedText = sourceText.FormattedText
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote