Hi Ted,
Maybe I'm just tired, but I don't understand your question/problem. The code you show me will replace any existing content in the bookmark, insert strRep at the bookmark position, then recreate the bookmark around strRep. If you then apply the underlining to Bmrange, it should only underline strRep.
What am I missing? Can you describe to us how the result you're getting doesn't do that?
[Quoted Text] > Would like to only underline the data in the bookmark not the entire length > of the bookmark. > > currently we do: .bookmark(" ... ").range.font.underline=true > > then we add text to that bookmark with: > Dim Bmrange As Range > Set Bmrange = ActiveDocument.Bookmarks(strBkmk).Range > Bmrange.Text = strRep > ActiveDocument.Bookmarks.Add strBkmk, Bmrange > > where strBkmk is the name of the bookmark > strRep is the text to be placed in the bookmark > > wonder if something can be done with the first line to limit the range to > the length of strRep? TIA >
Cindy Meister INTER-Solutions, Switzerland http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004) http://www.word.mvps.org
This reply is posted in the Newsgroup; please post any follow question or reply in the newsgroup and not by e-mail :-)
|