 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Bob Bedford Guest
|
Posted: Wed Mar 14, 2007 7:51 pm Post subject: Word: line in bold |
|
|
Hi all, I've a TStringList component and print the elements of the list in a
word document.
In some cases I want the line to be printed in bold. Here is the code:
const
CR = #13#10;
....
if(ansipos(CR,(TStringList(PrintList.items[I])[J]))>0)then begin
DetR.Font.Bold := wdtoggle;
DetR.Collapse(DetDirect);
end;
DetR.InsertAfter(cr+TStringList(PrintList.items[I])[J]);
if(ansipos(CR,(TStringList(PrintList.items[I])[J]))>0)then begin
DetR.Font.Bold := wdtoggle;
DetR.Collapse(DetDirect);
end;
Using this code I only want the lines with the CR at the beginning to print
in bold. Instead it's the entire paragraph until the end of the document
that prints in bold.
How to print only this line in bold ?
Thanks for helping.
Bob |
|
| Back to top |
|
 |
Dex Guest
|
Posted: Wed Apr 11, 2007 12:45 am Post subject: Re: Word: line in bold |
|
|
Bob Bedford wrote: >>>
Hi all, I've a TStringList component and print the elements of the
list in a word document. In some cases I want the line to be printed
in bold. Here is the code:
const
CR = #13#10;
...
if(ansipos(CR,(TStringList(PrintList.items[I])[J]))>0)then begin
DetR.Font.Bold := wdtoggle;
DetR.Collapse(DetDirect);
end;
DetR.InsertAfter(cr+TStringList(PrintList.items[I])[J]);
if(ansipos(CR,(TStringList(PrintList.items[I])[J]))>0)then begin
DetR.Font.Bold := wdtoggle;
DetR.Collapse(DetDirect);
end;
Using this code I only want the lines with the CR at the beginning to
print in bold. Instead it's the entire paragraph until the end of the
document that prints in bold. How to print only this line in bold ?
Thanks for helping.
Bob
<<<
Bob,
This may seem like stating the obvious but, have you tried set the font
back to normal after the text you want to bold?
-- |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|