1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
| Sub SIG_entete()
'
' Macro3 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
Selection.ParagraphFormat.TabStops.Add Position:=CentimetersToPoints(8), _
Alignment:=wdAlignTabLeft, Leader:=wdTabLeaderSpaces
Selection.ParagraphFormat.TabStops.Add Position:=CentimetersToPoints(15.5) _
, Alignment:=wdAlignTabLeft, Leader:=wdTabLeaderSpaces
Selection.TypeText Text:=vbTab & vbTab
Selection.MoveLeft Unit:=wdCharacter, count:=2
With ActiveDocument.Bookmarks
.Add Range:=Selection.Range, Name:="logo"
.DefaultSorting = wdSortByName
.ShowHidden = False
End With
Selection.MoveRight Unit:=wdCharacter, count:=2
With ActiveDocument.Bookmarks
.Add Range:=Selection.Range, Name:="NumInes"
.DefaultSorting = wdSortByName
.ShowHidden = False
End With
If Selection.HeaderFooter.IsHeader = True Then
ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageFooter
Else
ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader
End If
Selection.TypeText Text:=vbTab & vbTab
Selection.MoveLeft Unit:=wdCharacter, count:=2
With ActiveDocument.Bookmarks
.Add Range:=Selection.Range, Name:="confidential2"
.DefaultSorting = wdSortByName
.ShowHidden = False
End With
Selection.MoveRight Unit:=wdCharacter, count:=1
With ActiveDocument.Bookmarks
.Add Range:=Selection.Range, Name:="page"
.DefaultSorting = wdSortByName
.ShowHidden = False
End With
Selection.MoveRight Unit:=wdCharacter, count:=1
With ActiveDocument.Bookmarks
.Add Range:=Selection.Range, Name:="date2"
.DefaultSorting = wdSortByName
.ShowHidden = False
End With
ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument
End Sub |
Partager