B
Blackberry
Hi All
I know this is a big ask, but I could really do with some help making the
below reliable and as fast as possible.
In essence I have a word doc consisting of 1 table, which has about 20 cols
and 6 rows.
In my VB app, I have a list of say 30 - 35 people, who have to go into
specific cells in this word doc table.
I have managed to do this by using a CASE statement to concat the names (+ a
carriage return) into an array (let's say of 20 values, ie 20 cols for 1
row) and then I squirt the content of each value in the array into the
relevant cell bookmarks in the Word doc.
I have this bit working perfectly. The problem is that these people are
flagged with certain attributes, which in turn need to be graphically
represented on the word doc either by text background colours, text
foreground colours or styles (ie bold, italic & underline).
I have all of this info available to me in an array, but my problem is that
I don't APPEAR to be able to 'tag' these styles to the people. For example
if I could use tags like I can in HTML, I could do the following in my
array:
Array(0) = "<red><bold>Fred Smith</bold></red>" & vbCrLf &
"<green><italic>Fred Smith2</italic></green>" & vbCrLf
..... etc...
Array(1) = "<yellow>Fred Smith3</yellow>" & vbCrLf &
"<underline>Fred Smith4</underline>" & vbCrLf .... etc...
and so on...
What I'm trying to say is that the tags allow me to format each person in
the array, but I don't think Word VBA can do this - am I right?
Can you think of another way round this, bearing in mind that I don't know
how many people will be in each cell and each person can have different
attributes to the others in the same cell.
Thanks for any pointers you can give.
I know this is a big ask, but I could really do with some help making the
below reliable and as fast as possible.
In essence I have a word doc consisting of 1 table, which has about 20 cols
and 6 rows.
In my VB app, I have a list of say 30 - 35 people, who have to go into
specific cells in this word doc table.
I have managed to do this by using a CASE statement to concat the names (+ a
carriage return) into an array (let's say of 20 values, ie 20 cols for 1
row) and then I squirt the content of each value in the array into the
relevant cell bookmarks in the Word doc.
I have this bit working perfectly. The problem is that these people are
flagged with certain attributes, which in turn need to be graphically
represented on the word doc either by text background colours, text
foreground colours or styles (ie bold, italic & underline).
I have all of this info available to me in an array, but my problem is that
I don't APPEAR to be able to 'tag' these styles to the people. For example
if I could use tags like I can in HTML, I could do the following in my
array:
Array(0) = "<red><bold>Fred Smith</bold></red>" & vbCrLf &
"<green><italic>Fred Smith2</italic></green>" & vbCrLf
..... etc...
Array(1) = "<yellow>Fred Smith3</yellow>" & vbCrLf &
"<underline>Fred Smith4</underline>" & vbCrLf .... etc...
and so on...
What I'm trying to say is that the tags allow me to format each person in
the array, but I don't think Word VBA can do this - am I right?
Can you think of another way round this, bearing in mind that I don't know
how many people will be in each cell and each person can have different
attributes to the others in the same cell.
Thanks for any pointers you can give.