Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / January 2006

Tip: Looking for answers? Try searching our database.

bookmark underline

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
ted medin - 25 Jan 2006 00:02 GMT
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

Signature

MMAPHQ

WWW.MMAP.ORG

Cindy M  -WordMVP- - 26 Jan 2006 19:14 GMT
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?

> Would like to only underline the data in the bookmark not the entire length
> of the bookmark.
[quoted text clipped - 12 lines]
> 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 :-)

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.