Re: align text left and align text right: on the same line

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Jay -

I am trying to do this with VBA. What I really need is to access ONLY the
middle "section" (I know this is not the correct use of my vocab) in the
header and footer. For example, I'm trying to get this done:

##### (TAB) MyString (TAB) ####

Where the pound signs are something anybody can manually enter, the (TAB) is
the seperating tabstop (making the header/footer have a left alligned section
of text, a center alligned section of text, and a right allighned section of
text). MyString is a variable in the VBA code.

Currently, all I can think of is count the total characters in the header,
then divide it by two (hoping that will land me in the middle) and selecting
the word that's associated with that character location, and changing it.
This really is way too buggy, and I know it's not the proper way to do
things! If you know of a way that I can access only the center section of a
header or footer, I'd greatly appreciate it... thanks!

Dereck

"Jay Freedman" wrote:

> On 20 Aug 2005 07:11:24 -0700, kellrobinson@xxxxxxxxxxxx wrote:
>
> >How to do it in MS Word?
>
> Set a right-aligned tab stop at the right margin. After entering the
> left-aligned text, press Tab and then enter the right-aligned text.
>
> The styles named Header and Footer already have the desired tab stop,
> as well as one at the center of the line. You can define your own
> style with a right-aligned tab and apply it wherever you want.
>
> BTW, this question is off-topic in a VBA newsgroup unless you're
> asking how to do it in a macro. It would be more appropriate to post
> it in the microsoft.public.word.pagelayout group.
>
> --
> Regards,
> Jay Freedman
> Microsoft Word MVP FAQ: http://word.mvps.org
>
.



Relevant Pages

  • Re: changing control props in datasheet view for active record
    ... although the field txtCurkey is recognized by VBA when i ... conditional formatting will only be applied to one record. ... then you will need a text box in the header section ... >>>holds nothing but labels with the controls' names. ...
    (microsoft.public.access.formscoding)
  • Re: Transpose Row- Orientated Data after Import
    ... I'll try to explain the reasoning. ... The header needs to be pulled out and transposed as ... I know about transposing in Excel, but I'd like to minimise the ... BTW- I had not grasped the clear distinction between Macros and VBA. ...
    (microsoft.public.access.macros)
  • Re: Word 2007 header with page number wont work
    ... you select the control and then click Developer> (Controls chunk) ... From the Insert tab, click the Header button; ... From the Design tab, click Page Number, Current Position, Plain Number. ...
    (microsoft.public.word.pagelayout)
  • Re: Word 2007 header with page number wont work
    ... The way it's used in this particular feature, the Content Control is ... From the Insert tab, click the Header button; ... From the Design tab, click Page Number, Current Position, Plain Number. ...
    (microsoft.public.word.pagelayout)
  • Re: Word 2007 header with page number wont work
    ... From the Insert tab, click the Header button; ... From the Design tab, click Page Number, Current Position, Plain Number. ... and click the Bottom Border button. ...
    (microsoft.public.word.pagelayout)