Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 07-01-2023, 06:45 PM
Guessed's Avatar
Guessed Guessed is offline Strange visualization error after copying paragraphs from one document to another Windows 10 Strange visualization error after copying paragraphs from one document to another 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
 

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Visualization with MS Project idole Project 0 11-07-2018 12:46 AM
Copying paragraphs from multiple documents to the current one. paik1002 Word VBA 3 02-22-2016 04:03 AM
Two visualization with the same file bobparr PowerPoint 1 01-11-2015 09:22 AM
Strange visualization error after copying paragraphs from one document to another strange grayed out line prevents copying or deletion after endnotes JerryL Word 1 02-09-2014 08:59 AM
Strange visualization error after copying paragraphs from one document to another Strange error mesage andrew6800 Outlook 2 01-23-2011 06:02 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 03:55 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft