I have a document that I open up and import data from a Sql Database. I
perform this with VBA code. I make an adjustment to the margins that
changes text entered into the document. It also changes the width of the
headers and footers which is something that I dont want to happen. How do
I keep that from happening with VBA code.

Re: Header and Footer Margins by Anne

Anne
Wed Oct 26 16:20:36 CDT 2005

It sounds, Jim, like you might need to be adjusting indentation on the
paragraphs instead of adjusting margins. You can't really change the margin
without its header and footer too (or not nearly as easily), so perhaps just
using indentation both left and right would help you.
************
Anne Troy
www.OfficeArticles.com

"JimS" <noholycowser21spam@ya_NoJunk_hoo.com> wrote in message
news:eoCNhGn2FHA.3052@TK2MSFTNGP10.phx.gbl...
>I have a document that I open up and import data from a Sql Database. I
> perform this with VBA code. I make an adjustment to the margins that
> changes text entered into the document. It also changes the width of the
> headers and footers which is something that I dont want to happen. How
> do
> I keep that from happening with VBA code.
>
>



Re: Header and Footer Margins by JimS

JimS
Thu Oct 27 12:15:22 CDT 2005

Thanks Anne
I have tried to adjust the indentation but I dont seem to have the correct
adjustment. I am not sure that I really know where to put the indent to
move the data to the desired format. I appreciate any help to get pointed
to the right direction.
Thanks
The original code (snippet) that I am using is as follows:


With ActiveDocument.PageSetup
.LeftMargin = InchesToPoints(1)
.RightMargin = InchesToPoints(1)
End With

With ActiveDocument.Range(Start:=Selection.Start, End:=ActiveDocument. _
Content.End).PageSetup.TextColumns
.SetCount NumColumns:=2
.EvenlySpaced = True
.LineBetween = False
.Width = InchesToPoints(1.75)
.Spacing = InchesToPoints(0.5)
End With

Selection.ParagraphFormat.Alignment = wdAlignParagraphLeft

do while not adoRS.eof

' A blank line.
Selection.TypeParagraph

' print the name
Selection.TypeText StrConv(RTrim(adoRS!NAME_TITLE),
vbProperCase) & "." & " "
Selection.TypeText RTrim(adoRS!FIRST_NAME) & " "
Selection.TypeText " " & RTrim(adoRS!LAST_NAME)
Selection.TypeText " "
Selection.TypeParagraph
loop


"Anne Troy" <ng@officearticles.com> wrote in message
news:%23sHVdMn2FHA.1148@tk2msftngp13.phx.gbl...
It sounds, Jim, like you might need to be adjusting indentation on the
paragraphs instead of adjusting margins. You can't really change the margin
without its header and footer too (or not nearly as easily), so perhaps just
using indentation both left and right would help you.
************
Anne Troy
www.OfficeArticles.com

"JimS" <noholycowser21spam@ya_NoJunk_hoo.com> wrote in message
news:eoCNhGn2FHA.3052@TK2MSFTNGP10.phx.gbl...
>I have a document that I open up and import data from a Sql Database. I
> perform this with VBA code. I make an adjustment to the margins that
> changes text entered into the document. It also changes the width of the
> headers and footers which is something that I dont want to happen. How
> do
> I keep that from happening with VBA code.
>
>




Re: Header and Footer Margins by Jean-Guy

Jean-Guy
Thu Oct 27 12:42:23 CDT 2005

JimS was telling us:
JimS nous racontait que :

> I have a document that I open up and import data from a Sql Database.
> I perform this with VBA code. I make an adjustment to the margins
> that changes text entered into the document. It also changes the
> width of the headers and footers which is something that I dont want
> to happen. How do I keep that from happening with VBA code.

Why can't you adjust the margins and header/footer in the template manually?
Why do you have to do it with code?

Another solution is to put the header/footer stuff in a table with fixed
width or in a textbox that is has its position set to a value that is
relative to the edge of the page.

--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org



Re: Header and Footer Margins by Charles

Charles
Thu Oct 27 14:14:09 CDT 2005

Try changing the indents on the Header and Footer styles.
--
Charles Kenyon

Word New User FAQ & Web Directory: http://addbalance.com/word

Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide) http://addbalance.com/usersguide

See also the MVP FAQ: http://word.mvps.org/FAQs/ which is awesome!
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.

"JimS" <noholycowser21spam@ya_NoJunk_hoo.com> wrote in message
news:eoCNhGn2FHA.3052@TK2MSFTNGP10.phx.gbl...
>I have a document that I open up and import data from a Sql Database. I
> perform this with VBA code. I make an adjustment to the margins that
> changes text entered into the document. It also changes the width of the
> headers and footers which is something that I dont want to happen. How
> do
> I keep that from happening with VBA code.
>
>