B
Blackberry
Hi All
I could really do with your help as I'm completely stuck.
To explain, I have 1 word doc with 1 table, which consists of about 22 cols
and 10 rows.
Basically I throw pupil names at this table (via VBA) so that the pupils go
into the relevant cells. I had this working perfectly without any form of
formatting, eg I just did a few array loops to check which cell they needed
to go in, concated them up and then 'blobbed' each concated string into the
relevant cell. Perfect, but then I moved onto the task that I really
wanted, which was to format the text colour, text bg colour, bold, italic
and underline styles for each name and this is where I've got major stuck.
Because each name can have diff colours and styles and because I don't know
how many people will go into each cell, I need to do one at a time pass
throughs, so out go my arrays!!
The problem is that I can't get my text to style-ise at all and I think it
is because of the way my bookmarks are setup.
Basically I have an empty bookmark in each cell, got to have this as a lot
of the cells might be empty so text markers would look crap, and when I do
the old:
oNewDoc.Bookmarks(intTableCell).Range.Text = arrPupilData(0, intCurrentRec)
& vbCrLf
I think this text just gets lobbed onto the end of the bookmark so I can't
reference it to format it, because my bookmark doesn't contain any text - is
this right?
Does anybody know how I can get round this bearing in mind that I need to
format each name separately?
Thanks
I could really do with your help as I'm completely stuck.
To explain, I have 1 word doc with 1 table, which consists of about 22 cols
and 10 rows.
Basically I throw pupil names at this table (via VBA) so that the pupils go
into the relevant cells. I had this working perfectly without any form of
formatting, eg I just did a few array loops to check which cell they needed
to go in, concated them up and then 'blobbed' each concated string into the
relevant cell. Perfect, but then I moved onto the task that I really
wanted, which was to format the text colour, text bg colour, bold, italic
and underline styles for each name and this is where I've got major stuck.
Because each name can have diff colours and styles and because I don't know
how many people will go into each cell, I need to do one at a time pass
throughs, so out go my arrays!!
The problem is that I can't get my text to style-ise at all and I think it
is because of the way my bookmarks are setup.
Basically I have an empty bookmark in each cell, got to have this as a lot
of the cells might be empty so text markers would look crap, and when I do
the old:
oNewDoc.Bookmarks(intTableCell).Range.Text = arrPupilData(0, intCurrentRec)
& vbCrLf
I think this text just gets lobbed onto the end of the bookmark so I can't
reference it to format it, because my bookmark doesn't contain any text - is
this right?
Does anybody know how I can get round this bearing in mind that I need to
format each name separately?
Thanks