Skip to content

Instantly share code, notes, and snippets.

@tombrad
Created February 6, 2013 23:52
Show Gist options
  • Save tombrad/4727041 to your computer and use it in GitHub Desktop.
Save tombrad/4727041 to your computer and use it in GitHub Desktop.
Curso VBA-8
Curso VBA-8Sub Macro2()
‘ Macro2 Macro
‘ Macro grabada el 24-12-98 por TOMAS BRADANOVIC
If ActiveWindow.View.SplitSpecial <> wdPaneNone Then
ActiveWindow.Panes(2).Close
End If
If ActiveWindow.ActivePane.View.Type = wdNormalView Or ActiveWindow. _
ActivePane.View.Type = wdOutlineView Or ActiveWindow.ActivePane.View.Type _= wdMasterView Then
ActiveWindow.ActivePane.View.Type = wdPageView
End If
ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader
Selection.TypeText Text:= _
“Tomás Bradanovic, Consultoría en Proyectos de Inversión Públ”
Selection.TypeText Text:=”ica”
Selection.TypeParagraph
Selection.HeaderFooter.Shapes.AddLine(72#, 93.6, 540#, 93.6).Select
If Selection.HeaderFooter.IsHeader = True Then
ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageFooter
Else
ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader
End If
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldNumPages
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldNumPages
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldPage
NormalTemplate.AutoTextEntries(“Página X de Y”).Insert Where:=Selection. _
Range
ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment