Re: text formatting



Hi Edward,

Have you ever heard about the difference between fixed-width and
proportional fonts? The trouble you're having is that your document uses
proportional fonts -- different characters have different widths -- so the
width of the text isn't determined just by the number of characters.

The way all word processors get around this is to set a tab stop at the
right end of the line, and insert a tab character between the text and the
number. Further, most of them (including Word) let you format a tab stop
with a "leader" character such as the dots you're trying to insert. So you
just insert a tab character, and the space is automatically filled in with
dots. Read http://www.word.mvps.org/FAQs/Formatting/SettingTabs.htm.

Finally, it looks like you're trying to create an index. Word has a built-in
feature for marking index entries and a field for building an index from
those entries. If that's what you're doing, look in the help file for "How
to make an index".

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

Edward wrote:
Hi everybody,
Im using the following code to genetare a text formatting
mystr= ' somthing
For x = 1 To 50 - Len(mystr)
mystr = mystr + " " + "."
Next
my problem is for different lenght of mystr even when i use truetype
font the results don't line up correctly

first text .............................1
seocnd long text ................2
altough we have the same number of characters in each line but 1 and
2 don't line up correctly . any suggestions?
Thanks,


.



Relevant Pages

  • Re: Bookmark with overwrite function?
    ... >bookmarkand next column of text printed with an underline character. ... >>> text length between the bookmark and the data replacing the bookmark. ... and separate the placeholder from that text with a tab character. ... >> Jay Freedman ...
    (microsoft.public.word.vba.general)
  • Re: reading variably sized floats
    ... It's supposed to be the f5.2 specifier. ... In the input file the line being read is: ... The tab character is just a character and is counted as 1 when using ... Most COMPILERS will adjust for the tab character in the SOURCE ...
    (comp.lang.fortran)
  • [OT} Re: Newsgroup
    ... Mike Coon wrote: ... > Now even text-only devices can surely use proportional fonts so a fixed ... > character width for line breaks doesn't make so much sense as it once did. ... John Miller ...
    (sci.geo.satellite-nav)
  • Re: Passing tab char in command line
    ... I want to pass a tab character as a command line parameter. ... On Windows XP, for example, most people use the shell known as "cmd.exe". ...
    (comp.lang.java.programmer)
  • Re: Question On Creating A Table ?
    ... it's important to have a unique character between the number ... After you determine that there is a unique character separating each ... (click "Tabs" if there is a tab character; ...
    (microsoft.public.word.newusers)