J
Jon Rowland
Hi this is my first post to this forum and hope someone can help!!
(Will be using this on Word97)
What I am trying to do is as follows:
Upon Print/Print Preview I wish the network User ID into my document
footer. (This I have managed)
More specfically I wish to add to exsisting footer text. I have a 3x3
table and wish to add this data into cell C3 (ie bottom right) (This I
can't manage) and I would be gratful if anyone can assit.
Below is the code I have managed to pull together (Just the
PrintPreview bit to save space).
Sub FilePrintPreview()
'
' FilePrintPreview Macro
' Displays full pages as they will be printed
'
ActiveDocument.PrintPreview
strUser = LCase(Environ("username"))
' Open Header/Footer view
If ActiveWindow.View.SplitSpecial <> wdPaneNone Then
ActiveWindow.Panes(2).Close
End If
If ActiveWindow.ActivePane.View.Type = wdNormalView Or
ActiveWindow. _
ActivePane.View.Type = wdOutlineView Then
ActiveWindow.ActivePane.View.Type = wdPrintView
End If
ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader
If Selection.HeaderFooter.IsHeader = True Then
ActiveWindow.ActivePane.View.SeekView =
wdSeekCurrentPageFooter
Else
ActiveWindow.ActivePane.View.SeekView =
wdSeekCurrentPageHeader
End If
' Add Footer Text
Selection.MoveRight Unit:=wdCell
Selection.MoveRight Unit:=wdCell
Selection.MoveRight Unit:=wdCell
Selection
Many thanks
Jon
(Will be using this on Word97)
What I am trying to do is as follows:
Upon Print/Print Preview I wish the network User ID into my document
footer. (This I have managed)
More specfically I wish to add to exsisting footer text. I have a 3x3
table and wish to add this data into cell C3 (ie bottom right) (This I
can't manage) and I would be gratful if anyone can assit.
Below is the code I have managed to pull together (Just the
PrintPreview bit to save space).
Sub FilePrintPreview()
'
' FilePrintPreview Macro
' Displays full pages as they will be printed
'
ActiveDocument.PrintPreview
strUser = LCase(Environ("username"))
' Open Header/Footer view
If ActiveWindow.View.SplitSpecial <> wdPaneNone Then
ActiveWindow.Panes(2).Close
End If
If ActiveWindow.ActivePane.View.Type = wdNormalView Or
ActiveWindow. _
ActivePane.View.Type = wdOutlineView Then
ActiveWindow.ActivePane.View.Type = wdPrintView
End If
ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader
If Selection.HeaderFooter.IsHeader = True Then
ActiveWindow.ActivePane.View.SeekView =
wdSeekCurrentPageFooter
Else
ActiveWindow.ActivePane.View.SeekView =
wdSeekCurrentPageHeader
End If
' Add Footer Text
Selection.MoveRight Unit:=wdCell
Selection.MoveRight Unit:=wdCell
Selection.MoveRight Unit:=wdCell
Selection
Many thanks
Jon