![]() When you set the range's underline property to 1, that setting will apply to the whole document. Each time you insert new text, or a new paragraph mark, the range is extended, so it still covers the whole document. That's because you initially set it to oDocument.Range(). The problem is that oRange refers to the entire document. I understand what is going wrong, but I'm not sure how well I can explain it. ![]() Steve RE: Word automation - How to underline text Olaf Doschke (Programmer) 31 Aug 17 14:43 ORange.InsertAfter("Description of proposed works") & THIS IS THE LINE I WANT UNDERLINEDĪs mentioned, I have tried putting the line = 1 in different places but either all text or no text are underlined. ORange.InsertAfter("Subject: " +CHR(9) + ALLTRIM(LEFT(UPPER(qsubject),1))+ ĪLLTRIM(RIGHT(LOWER(qsubject),LEN(qsubject)-1))) ORange.InsertAfter(CHR(9) + CHR(9)+ ALLTRIM(PROPER(msadd02))+", "+ ĪLLTRIM(PROPER(msadd03))+" "+ALLTRIM(UPPER(mspcode))) ORange.InsertAfter("Site: " + CHR(9) + CHR(9)+ ALLTRIM(PROPER(sadd01))+ ORange.InsertAfter("Client: " + CHR(9) + CHR(9)+ qpropcust) ORange.InsertAfter("Date: " + CHR(9) + CHR(9)+ DTOC(quotedate)) ORange.InsertAfter("Quote Ref: " + CHR(9) + qlongquote)
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |