Mixed-font string both to cells and word document

W

Walter Briscoe

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top