Advertisement
Guest User

Untitled

a guest
Aug 29th, 2016
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Sub Palkat()
  2. '
  3. ' Palkat Makro
  4. '
  5. '
  6.    ActiveDocument.Tables.Add Range:=Selection.Range, NumRows:=3, NumColumns:= _
  7.         13, DefaultTableBehavior:=wdWord9TableBehavior, AutoFitBehavior:= _
  8.         wdAutoFitFixed
  9.     With Selection.Tables(1)
  10.         If .Style <> "Taulukko Ruudukko" Then
  11.             .Style = "Taulukko Ruudukko"
  12.         End If
  13.         .ApplyStyleHeadingRows = True
  14.         .ApplyStyleLastRow = False
  15.         .ApplyStyleFirstColumn = True
  16.         .ApplyStyleLastColumn = False
  17.         .ApplyStyleRowBands = True
  18.         .ApplyStyleColumnBands = False
  19.     End With
  20.     Selection.MoveRight Unit:=wdCharacter, Count:=1
  21.     Selection.TypeText Text:="Tammi"
  22.     Selection.MoveRight Unit:=wdCell
  23.     Selection.TypeText Text:="Helmi"
  24.     Selection.MoveRight Unit:=wdCharacter, Count:=1
  25.     Selection.TypeText Text:="Maalis"
  26.     Selection.MoveRight Unit:=wdCharacter, Count:=1
  27.     Selection.TypeText Text:="Huhti"
  28.     Selection.MoveRight Unit:=wdCharacter, Count:=1
  29.     Selection.TypeText Text:="Touko"
  30.     Selection.MoveRight Unit:=wdCharacter, Count:=1
  31.     Selection.TypeText Text:="Kesä"
  32.     Selection.MoveRight Unit:=wdCharacter, Count:=1
  33.     Selection.TypeText Text:="Heinä"
  34.     Selection.MoveRight Unit:=wdCharacter, Count:=1
  35.     Selection.TypeText Text:="Elo"
  36.     Selection.MoveRight Unit:=wdCharacter, Count:=1
  37.     Selection.TypeText Text:="Syys"
  38.     Selection.MoveRight Unit:=wdCharacter, Count:=1
  39.     Selection.TypeText Text:="Loka"
  40.     Selection.MoveRight Unit:=wdCharacter, Count:=1
  41.     Selection.TypeText Text:="Marras"
  42.     Selection.MoveRight Unit:=wdCharacter, Count:=1
  43.     Selection.TypeText Text:="Joulu"
  44.     Selection.MoveDown Unit:=wdLine, Count:=1
  45.     Selection.MoveLeft Unit:=wdCharacter, Count:=12
  46.     Selection.TypeText Text:="Brutto"
  47.     Selection.MoveDown Unit:=wdLine, Count:=1
  48.     Selection.TypeText Text:="Netto"
  49.     ActiveDocument.Save
  50. End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement