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 / June 2007

Tip: Looking for answers? Try searching our database.

Defining Font Spacing

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Steffen Rieke - 28 Jun 2007 13:46 GMT
Hello everyone,

i've written a macro that searches for space characters in the selected text
and alters their font spacing to a specific amount. But when I try to set the
spacing to a value with more than one decimal places, Word treats the value
as if it only has one decimal place.

My code:

   Selection.Find.ClearFormatting
   Selection.Find.Replacement.ClearFormatting
   Selection.Find.Replacement.Font.Spacing = 0.95 '<<< this is my desired
value
   With Selection.Find
       .Text = " "
       .Replacement.Text = " "
       .Forward = True
       .Wrap = wdFindContinue
       .Format = True
       .MatchCase = False
       .MatchWholeWord = False
       .MatchWildcards = False
       .MatchSoundsLike = False
       .MatchAllWordForms = False
   End With
   Selection.Find.Execute Replace:=wdReplaceAll

I set Selection.Find.Replacement.Font.Spacing to 0.95. But after execution,
the font spacing of my characters has been set to 0.9! How can I tell Word to
set it to exactly 0.95?

Thanks in advance,
Steffen
Stefan Blom - 28 Jun 2007 14:27 GMT
Word seems to support no more than a single decimal place for character
spacing.

Signature

Stefan Blom
Microsoft Word MVP

> Hello everyone,
>
[quoted text clipped - 29 lines]
> Thanks in advance,
> Steffen
 
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.