N
n6trf
I created a macro by going into the header then setting tabs & entering the
data for the heading. @ that point I clicked on view & then header/footer.
That took me back to the document, I center justified & inserted the date,
left justified & inserted a couple of enters. When I executed the macro the
date & enters were placed in the header????
This is the macro
Sub Macro1()
'
' Macro1 Macro
' Macro recorded 2008-02-12 by ted medin
'
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
Selection.ParagraphFormat.TabStops.ClearAll
ActiveDocument.DefaultTabStop = InchesToPoints(0.5)
Selection.ParagraphFormat.TabStops.Add Position:=InchesToPoints(1), _
Alignment:=wdAlignTabRight, Leader:=wdTabLeaderSpaces
Selection.ParagraphFormat.TabStops.Add Position:=InchesToPoints(1.25), _
Alignment:=wdAlignTabLeft, Leader:=wdTabLeaderSpaces
Selection.ParagraphFormat.TabStops.Add Position:=InchesToPoints(3), _
Alignment:=wdAlignTabCenter, Leader:=wdTabLeaderSpaces
Selection.ParagraphFormat.TabStops.Add Position:=InchesToPoints(3.6), _
Alignment:=wdAlignTabCenter, Leader:=wdTabLeaderSpaces
Selection.ParagraphFormat.TabStops.Add Position:=InchesToPoints(4.2), _
Alignment:=wdAlignTabCenter, Leader:=wdTabLeaderSpaces
Selection.ParagraphFormat.TabStops.Add Position:=InchesToPoints(4.6), _
Alignment:=wdAlignTabLeft, Leader:=wdTabLeaderSpaces
Selection.EndKey Unit:=wdStory, Extend:=wdExtend
Selection.TypeText Text:="Date" & vbTab & "Mem#" & vbTab & "Name" &
vbTab _
& "Total" & vbTab & "Deduct" & vbTab & "Nonded" & vbTab & "Items"
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
Selection.ParagraphFormat.Alignment = wdAlignParagraphCenter
Selection.InsertDateTime DateTimeFormat:="MMMM d, yyyy", InsertAsField:=
_
True, DateLanguage:=wdEnglishUS, CalendarType:=wdCalendarWestern, _
InsertAsFullWidth:=False
Selection.TypeParagraph
Selection.TypeParagraph
Selection.ParagraphFormat.Alignment = wdAlignParagraphLeft
End Sub
What do i have to do to get the date ... in the doc not the header. TIA
data for the heading. @ that point I clicked on view & then header/footer.
That took me back to the document, I center justified & inserted the date,
left justified & inserted a couple of enters. When I executed the macro the
date & enters were placed in the header????
This is the macro
Sub Macro1()
'
' Macro1 Macro
' Macro recorded 2008-02-12 by ted medin
'
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
Selection.ParagraphFormat.TabStops.ClearAll
ActiveDocument.DefaultTabStop = InchesToPoints(0.5)
Selection.ParagraphFormat.TabStops.Add Position:=InchesToPoints(1), _
Alignment:=wdAlignTabRight, Leader:=wdTabLeaderSpaces
Selection.ParagraphFormat.TabStops.Add Position:=InchesToPoints(1.25), _
Alignment:=wdAlignTabLeft, Leader:=wdTabLeaderSpaces
Selection.ParagraphFormat.TabStops.Add Position:=InchesToPoints(3), _
Alignment:=wdAlignTabCenter, Leader:=wdTabLeaderSpaces
Selection.ParagraphFormat.TabStops.Add Position:=InchesToPoints(3.6), _
Alignment:=wdAlignTabCenter, Leader:=wdTabLeaderSpaces
Selection.ParagraphFormat.TabStops.Add Position:=InchesToPoints(4.2), _
Alignment:=wdAlignTabCenter, Leader:=wdTabLeaderSpaces
Selection.ParagraphFormat.TabStops.Add Position:=InchesToPoints(4.6), _
Alignment:=wdAlignTabLeft, Leader:=wdTabLeaderSpaces
Selection.EndKey Unit:=wdStory, Extend:=wdExtend
Selection.TypeText Text:="Date" & vbTab & "Mem#" & vbTab & "Name" &
vbTab _
& "Total" & vbTab & "Deduct" & vbTab & "Nonded" & vbTab & "Items"
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
Selection.ParagraphFormat.Alignment = wdAlignParagraphCenter
Selection.InsertDateTime DateTimeFormat:="MMMM d, yyyy", InsertAsField:=
_
True, DateLanguage:=wdEnglishUS, CalendarType:=wdCalendarWestern, _
InsertAsFullWidth:=False
Selection.TypeParagraph
Selection.TypeParagraph
Selection.ParagraphFormat.Alignment = wdAlignParagraphLeft
End Sub
What do i have to do to get the date ... in the doc not the header. TIA