M
maviso5
Hello
I have created a macro that puts my name and the date in the header when i
push the assigned keys Ctrl + D. However when i run the macro this is what
the VB error takes me to:
'
' Macro2 Macro
'
'
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
ActiveDocument.AttachedTemplate.BuildingBlockEntries("
Blank").Insert _
Where:=Selection.Range, RichText:=True
Selection.TypeText Text:="Daniel Davey 13NB" & vbTab & vbTab
Selection.InsertDateTime DateTimeFormat:="dd/MM/yyyy",
InsertAsField:=True _
, DateLanguage:=wdEnglishUK, CalendarType:=wdCalendarWestern, _
InsertAsFullWidth:=False
ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument
End Sub
This bit...
ActiveDocument.AttachedTemplate.BuildingBlockEntries("
Blank").Insert _
Where:=Selection.Range, RichText:=True
Is the bit that it doesnt like....can anyone help me?
Dan
I have created a macro that puts my name and the date in the header when i
push the assigned keys Ctrl + D. However when i run the macro this is what
the VB error takes me to:
'
' Macro2 Macro
'
'
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
ActiveDocument.AttachedTemplate.BuildingBlockEntries("
Blank").Insert _
Where:=Selection.Range, RichText:=True
Selection.TypeText Text:="Daniel Davey 13NB" & vbTab & vbTab
Selection.InsertDateTime DateTimeFormat:="dd/MM/yyyy",
InsertAsField:=True _
, DateLanguage:=wdEnglishUK, CalendarType:=wdCalendarWestern, _
InsertAsFullWidth:=False
ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument
End Sub
This bit...
ActiveDocument.AttachedTemplate.BuildingBlockEntries("
Blank").Insert _
Where:=Selection.Range, RichText:=True
Is the bit that it doesnt like....can anyone help me?
Dan