Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 279
Default Mixed-font string both to cells and word document

I use Microsoft Office Excel 2003 (11.8341.8341) SP3 with Microsoft Visual Basic
6.5 and Microsoft Office Word 2003 (11.8328.8341) SP3.
I use Microsoft Vista Business SP2.

I run VBA code from Excel and an open workbook.
I have a word document opened with CreateObject("Word.Application")

I have a string assembled from the Internet.
e.g.
Dim x as String
x = "I WILL arise and go now, and go to Innisfree," & vbcrlf & _
"And a small cabin build there, of clay and wattles made;" & vbcrlf & _
"Nine bean rows will I have there, a hive for the honey bee," & vbcrlf & _
"And live alone in the bee-loud glade."

I want to add some font information to that string. e.g. I might want
to make all capital letters bold.

I want to write the several lines to 4 successive cells in a column.
e.g.
cells(1, 1) = "I WILL arise and go now, and go to Innisfree,"
cells(2, 2) = "And a small cabin build there, of clay and wattles made;"
cells(3, 1) = "Nine bean rows will I have there, a hive for the honey bee,"
cells(4, 1) = "And live alone in the bee-loud glade."

I want to write the 'mixed-font string' to the Word document.

I don't want to apply fonts more than once.
Is that possible? I don't see how.

If I copy a cell to Word via the clipboard, peculiar things happen.
e.g. If [1, 1} does not have word-wrap set,
"I WILL
arise and
go now,
and go
to
Innisfree," is written and the text is put in a "box".
One way to eliminate the 'word wrap' in Word is to make [1, 1]
wide enough so the text in it does not spill into [1, 2] etc.
How do I eliminate the "box"?

I don't think there are any methods to manipulate the Clipboard.
Is there any way to control how Excel writes to the clipboard?

This is of low moment, but my lack of understanding annoys me.
--
Walter Briscoe
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cells won't change font color or show hi-lighted cells in document ROBIN Excel Discussion (Misc queries) 1 March 27th 08 09:39 PM
How to obtain superscript and mixed font info when read from Excel? [email protected] Excel Programming 3 February 13th 08 08:44 PM
Mixed font colours in a sentence bookman3 Excel Discussion (Misc queries) 1 June 8th 07 08:49 AM
mixed font styles in the output of a formula? trumbore Excel Worksheet Functions 1 September 14th 05 02:45 AM
Entering mixed font strings David Excel Programming 0 November 12th 03 09:23 AM


All times are GMT +1. The time now is 08:12 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"