Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 06-23-2014, 12:33 PM
Cosmo Cosmo is offline Moving formatted text from one table to another Windows Vista Moving formatted text from one table to another Office 2007
Competent Performer
Moving formatted text from one table to another
 
Join Date: Mar 2012
Posts: 240
Cosmo is on a distinguished road
Default Moving formatted text from one table to another

I have an issue moving formatted text from a cell in one table to another. If I just set the text property, everything works fine, but trying to get the text to keep the current formatting is proving much more work than necessary.

My initial testing just set the text property so:
Code:
 destTable.Cell(1,1).range.text = SourceTable.Cell(1,1).range.text
And that worked properly, but when I changed that one line to set the FormattedText, it would make a complete mess of the document, and usually crash:
Code:
 destTable.Cell(1,1).range.formattedText = SourceTable.Cell(1,1).range.formattedText
I found that stripping off the last few characters from the source range would do the trick, and the program would finish running without crashing, but not all of the text is correct. The last paragraph in each cell is now 11 point (the source is 9 point), and throughout, the font is inconsistent. The source table is all Calibri, but in any cell, some paragraphs are Calibri, and others will be Times.



All I want to do is set the contents of one cell to another, and maintain the same formatting. Why does this seem to be impossible!?
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
AutoCorrect with Formatted Text pmokover Word 15 05-11-2017 08:50 PM
Moving formatted text from one table to another Inserted AutoText table incorrectly formatted - unless macro paused! Smallweed Word VBA 4 01-16-2014 03:15 PM
Moving formatted text from one table to another Text auto formatted as date format Aikeedoh Excel 5 09-06-2013 02:38 AM
Import formatted text from Word into PowerPoint parboy PowerPoint 0 07-06-2011 08:52 AM
Insert formatted table into word (mail merge) manojbmsce Mail Merge 0 09-25-2008 02:25 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 02:49 AM.


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