Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.newusers
Sesquipedalian Sam Sesquipedalian Sam is offline
external usenet poster
 
Posts: 126
Default Displaying document settings

Is there any way to display the various document settings in the body
of the document so that they print?

I'm referring to paper size, orientation, margins, etc.
  #2   Report Post  
Posted to microsoft.public.word.newusers
Jay Freedman Jay Freedman is offline
external usenet poster
 
Posts: 9,854
Default Displaying document settings

On Sun, 07 Feb 2010 17:33:54 -0800, Sesquipedalian Sam
wrote:

Is there any way to display the various document settings in the body
of the document so that they print?

I'm referring to paper size, orientation, margins, etc.


There's nothing built in for that (you can set an option to print
document properties, but that's the information in the File
Properties dialog, not the things you mentioned).

A macro could collect the information and add it to the document. But
there's a problem: Those settings are on a per-section basis, and many
others are on a per-paragraph or per-character basis. If the document
isn't uniform throughout, what would you want it to print in the
summary?

--
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.
  #3   Report Post  
Posted to microsoft.public.word.newusers
Sesquipedalian Sam Sesquipedalian Sam is offline
external usenet poster
 
Posts: 126
Default Displaying document settings

On Sun, 07 Feb 2010 21:34:15 -0500, Jay Freedman
wrote:

On Sun, 07 Feb 2010 17:33:54 -0800, Sesquipedalian Sam
wrote:

Is there any way to display the various document settings in the body
of the document so that they print?

I'm referring to paper size, orientation, margins, etc.


There's nothing built in for that (you can set an option to print
document properties, but that's the information in the File
Properties dialog, not the things you mentioned).

A macro could collect the information and add it to the document. But
there's a problem: Those settings are on a per-section basis, and many
others are on a per-paragraph or per-character basis. If the document
isn't uniform throughout, what would you want it to print in the
summary?


It's a one-page document that I am using to test how various settings
appear on the printed page, especially for custom size paper. I have
two printers and they handle odd-size paper differently.

Could you post a snippet of a macro that would put the following
settings somewhere on the page?

Orientation setting (Portrait or Landscape)
Paper size (Letter/Custom/??? Width, Height)
Margins (Top, Bottom, Left, Right)

Thanks
  #4   Report Post  
Posted to microsoft.public.word.newusers
Jay Freedman Jay Freedman is offline
external usenet poster
 
Posts: 9,854
Default Displaying document settings

Sesquipedalian Sam wrote:
On Sun, 07 Feb 2010 21:34:15 -0500, Jay Freedman
wrote:

On Sun, 07 Feb 2010 17:33:54 -0800, Sesquipedalian Sam
wrote:

Is there any way to display the various document settings in the
body of the document so that they print?

I'm referring to paper size, orientation, margins, etc.


There's nothing built in for that (you can set an option to print
document properties, but that's the information in the File
Properties dialog, not the things you mentioned).

A macro could collect the information and add it to the document. But
there's a problem: Those settings are on a per-section basis, and
many others are on a per-paragraph or per-character basis. If the
document isn't uniform throughout, what would you want it to print
in the summary?


It's a one-page document that I am using to test how various settings
appear on the printed page, especially for custom size paper. I have
two printers and they handle odd-size paper differently.

Could you post a snippet of a macro that would put the following
settings somewhere on the page?

Orientation setting (Portrait or Landscape)
Paper size (Letter/Custom/??? Width, Height)
Margins (Top, Bottom, Left, Right)

Thanks


With those restrictions, you can use (or modify) this:

Sub DocLayout()
Dim outStr As String

With ActiveDocument
outStr = .FullName & vbCr & vbCr

With .PageSetup
outStr = outStr & "Orientation:" & vbTab
If .Orientation = wdOrientPortrait Then
outStr = outStr & "Portrait" & vbCr
Else
outStr = outStr & "Landscape" & vbCr
End If

outStr = outStr & "Paper size:" & vbTab
If .PaperSize = wdPaperCustom Then
outStr = outStr & "Custom, "
outStr = outStr & PointsToInches(.PageHeight)
outStr = outStr & """ x "
outStr = outStr & PointsToInches(.PageWidth)
outStr = outStr & """" & vbCr
Else
outStr = outStr & StandardSize & vbCr
End If

outStr = outStr & "Margins:" & vbTab
outStr = outStr & "Top" & vbTab & vbTab & _
PointsToInches(.TopMargin) & """" & _
vbCr & vbTab & vbTab
outStr = outStr & "Bottom" & vbTab & _
PointsToInches(.BottomMargin) & """" & _
vbCr & vbTab & vbTab
outStr = outStr & "Left" & vbTab & vbTab & _
PointsToInches(.LeftMargin) & """" & _
vbCr & vbTab & vbTab
outStr = outStr & "Right" & vbTab & vbTab & _
PointsToInches(.RightMargin) & """" & vbCr
End With

.Range.InsertAfter outStr
End With
End Sub

Private Function StandardSize() As String
Dim ret As String
Select Case ActiveDocument.PageSetup.PaperSize
Case wdPaper10x14
ret = "Standard 10 x 14 inches"
Case wdPaper11x17
ret = "Standard 11 x 17 inches"
Case wdPaperLegal
ret = "Legal"
Case wdPaperLetter
ret = "Letter"
Case wdPaperA3
ret = "A3"
Case wdPaperA4
ret = "A4"
Case wdPaperA5
ret = "A5"
Case wdPaperTabloid
ret = "Tabloid"
Case Else
ret = "Other (" & ActiveDocument.PageSetup.PaperSize & ")"
End Select
StandardSize = ret
End Function

--
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.


  #5   Report Post  
Posted to microsoft.public.word.newusers
Sesquipedalian Sam Sesquipedalian Sam is offline
external usenet poster
 
Posts: 126
Default Displaying document settings

On Mon, 8 Feb 2010 11:23:07 -0500, "Jay Freedman"
wrote:

Sesquipedalian Sam wrote:
On Sun, 07 Feb 2010 21:34:15 -0500, Jay Freedman
wrote:

On Sun, 07 Feb 2010 17:33:54 -0800, Sesquipedalian Sam
wrote:

Is there any way to display the various document settings in the
body of the document so that they print?

I'm referring to paper size, orientation, margins, etc.

There's nothing built in for that (you can set an option to print
document properties, but that's the information in the File
Properties dialog, not the things you mentioned).

A macro could collect the information and add it to the document. But
there's a problem: Those settings are on a per-section basis, and
many others are on a per-paragraph or per-character basis. If the
document isn't uniform throughout, what would you want it to print
in the summary?


It's a one-page document that I am using to test how various settings
appear on the printed page, especially for custom size paper. I have
two printers and they handle odd-size paper differently.

Could you post a snippet of a macro that would put the following
settings somewhere on the page?

Orientation setting (Portrait or Landscape)
Paper size (Letter/Custom/??? Width, Height)
Margins (Top, Bottom, Left, Right)

Thanks


With those restrictions, you can use (or modify) this:

Sub DocLayout()
Dim outStr As String

With ActiveDocument
outStr = .FullName & vbCr & vbCr

With .PageSetup
outStr = outStr & "Orientation:" & vbTab
If .Orientation = wdOrientPortrait Then
outStr = outStr & "Portrait" & vbCr
Else
outStr = outStr & "Landscape" & vbCr
End If

outStr = outStr & "Paper size:" & vbTab
If .PaperSize = wdPaperCustom Then
outStr = outStr & "Custom, "
outStr = outStr & PointsToInches(.PageHeight)
outStr = outStr & """ x "
outStr = outStr & PointsToInches(.PageWidth)
outStr = outStr & """" & vbCr
Else
outStr = outStr & StandardSize & vbCr
End If

outStr = outStr & "Margins:" & vbTab
outStr = outStr & "Top" & vbTab & vbTab & _
PointsToInches(.TopMargin) & """" & _
vbCr & vbTab & vbTab
outStr = outStr & "Bottom" & vbTab & _
PointsToInches(.BottomMargin) & """" & _
vbCr & vbTab & vbTab
outStr = outStr & "Left" & vbTab & vbTab & _
PointsToInches(.LeftMargin) & """" & _
vbCr & vbTab & vbTab
outStr = outStr & "Right" & vbTab & vbTab & _
PointsToInches(.RightMargin) & """" & vbCr
End With

.Range.InsertAfter outStr
End With
End Sub

Private Function StandardSize() As String
Dim ret As String
Select Case ActiveDocument.PageSetup.PaperSize
Case wdPaper10x14
ret = "Standard 10 x 14 inches"
Case wdPaper11x17
ret = "Standard 11 x 17 inches"
Case wdPaperLegal
ret = "Legal"
Case wdPaperLetter
ret = "Letter"
Case wdPaperA3
ret = "A3"
Case wdPaperA4
ret = "A4"
Case wdPaperA5
ret = "A5"
Case wdPaperTabloid
ret = "Tabloid"
Case Else
ret = "Other (" & ActiveDocument.PageSetup.PaperSize & ")"
End Select
StandardSize = ret
End Function


Thank you very much. I will see if I can get it to work. Very helpful.
Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Displaying several differnet xml in word document Boris Nikitin Page Layout 0 September 18th 08 11:50 AM
Displaying text from another part of a document Scott@TycoElectronics Microsoft Word Help 2 August 13th 08 01:43 PM
same word document displaying differently on different PCs Huwy Page Layout 1 May 2nd 08 02:32 PM
Displaying Document Name Lady Chablis Microsoft Word Help 0 November 20th 07 04:29 PM
Document map is displaying every second line Tara Keane Microsoft Word Help 2 April 4th 05 04:55 PM


All times are GMT +1. The time now is 12:41 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"