Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / March 2005

Tip: Looking for answers? Try searching our database.

Cell text with format

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
René Nordby - 02 Mar 2005 11:31 GMT
Hi there,
I have a problem, that I hope someone could give me a solution for.

I have a table, which I make a For Each Row on and collect some text from
some of the rows. I want to get the text include format, so I use the
property .FormattedText on the .Range object of the cell. I 'save' the
.FormattedText in a Range variable.

Later in my code i create a new document with a new table, and now I want
add my saved text to a specific cell in the  new table, but it goes wrong.

I really don't have any clue on what's going wron, because I use the right
cell, but anyway the text is add to another cell.

If I use .Text property instead of the .FormattedText property, both where I
'save' the text and where I add teh text, then it works.

This is the code where I 'save' the text
 Set myRange = myRow.Cells.Item(4).Range.FormattedText

This is the code where I add teh text
 myRow.Cells.Item(4).Range.FormattedText = myRange.FormattedText
Helmut Weber - 02 Mar 2005 12:59 GMT
Hi René,

have you tried to cut off the end of cell mark?

>Set myRange = myRow.Cells.Item(4).Range.FormattedText

MyRange.end = myrange.end - 1

Greetings from Bavaria, Germany
Helmut Weber, MVP
"red.sys" & chr(64) & "t-online.de"
Word 2002, Windows 2000
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.