HI Jonathan,
Thanks for the suggestion. I tried this and it works:
.InsertAfter( CR )
.InsertAfter( "Sales Tax: " + TAB)
.Collapse( wdCollapseEnd )
.InsertAfter( TAB )
.Underline = wdUnderLineSingle
oDocument.Bookmarks.ADD("SalesTax", oRange)
.Collapse( wdCollapseEnd )
Thanks again!
In that case, you need to break up the contents of the variable TAB and insert it in two parts, the non underlined spaces preceding the $ sign, and then underlined spaces after.
--
Regards
Jonathan West - Word MVP
http://www.multilinker.com
Please reply to the newsgroup
Jonathan,
Hmm We are getting closer <s>
Bid: $ 1250.00
Sales Tax: $ 62.50
Total: _____ $ 1312.50
Can we get the underline to start at the very beginning of the book mark which is the "$"?
Wilson
OK, in that case, you need to split things up a bit, as follows
.InsertAfter( CR )
.InsertAfter( "Sales Tax: ")
.Collapse( wdCollapseEnd )
.InsertAfter( TAB )
.Underline = wdUnderlineSingle
.Collapse( wdCollapseEnd )
oDocument.Bookmarks.Add("SalesTax", oRange)
--
Regards
Jonathan West - Word MVP
http://www.multilinker.com
Please reply to the newsgroup
Hi Jonathan,
Here is a snip of the code:
***
.InsertAfter( CR + CR)
.InsertAfter( "Bid: " + TAB)
.Collapse( wdCollapseEnd )
oDocument.Bookmarks.Add("Bid", oRange)
.InsertAfter( CR )
.InsertAfter( "Sales Tax: " + TAB )
.Underline = wdUnderlineSingle
.Collapse( wdCollapseEnd )
oDocument.Bookmarks.Add("SalesTax", oRange)
***
It did produce the underline for "Sales Tax: $ 62.50" however,
I only want the contents of the bookmark underlined which would be "$ 62.50".
(I am not sure if you can see the underline on the output I have enclosed?)
Bid: $ 1250.00
Sales Tax: $ 62.50
Total: $ 1312.50
Your help is very much appreciated.
Wilson