Guest User

Untitled

a guest
Jan 17th, 2019
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.03 KB | None | 0 0
  1. With Selection.Find
  2. .Text = "nr. (*) XZXZX^13Dosar nr."
  3. .Replacement.Text = ""
  4. .Forward = True
  5. .Wrap = wdFindContinue
  6. .Format = False
  7. .MatchCase = False
  8. .MatchWholeWord = False
  9. .MatchAllWordForms = False
  10. .MatchSoundsLike = False
  11. .MatchWildcards = True
  12. End With
  13. Selection.Find.Execute
  14.  
  15. Selection.MoveUp Unit:=wdLine, Count:=1
  16. ActiveDocument.Tables.Add Range:=Selection.Range, NumRows:=1, NumColumns:= _
  17. 2, DefaultTableBehavior:=wdWord9TableBehavior, AutoFitBehavior:= _
  18. wdAutoFitFixed
  19. With Selection.Tables(1)
  20. If .Style <> "Table Grid" Then
  21. .Style = "Table Grid"
  22. End If
  23. .ApplyStyleHeadingRows = True
  24. .ApplyStyleLastRow = False
  25. .ApplyStyleFirstColumn = True
  26. .ApplyStyleLastColumn = False
  27. .ApplyStyleRowBands = True
  28. .ApplyStyleColumnBands = False
  29. End With
  30. Selection.EndKey Unit:=wdLine, Extend:=wdExtend
  31. Selection.EndKey Unit:=wdLine, Extend:=wdExtend
  32. Selection.Borders(wdBorderTop).LineStyle = wdLineStyleNone
  33. Selection.Borders(wdBorderLeft).LineStyle = wdLineStyleNone
  34. Selection.Borders(wdBorderBottom).LineStyle = wdLineStyleNone
  35. Selection.Borders(wdBorderRight).LineStyle = wdLineStyleNone
  36. Selection.Borders(wdBorderVertical).LineStyle = wdLineStyleNone
  37. Selection.Borders(wdBorderDiagonalDown).LineStyle = wdLineStyleNone
  38. Selection.Borders(wdBorderDiagonalUp).LineStyle = wdLineStyleNone
  39. Selection.MoveLeft Unit:=wdCharacter, Count:=1
  40. Selection.MoveRight Unit:=wdCharacter, Count:=1
  41. Selection.ParagraphFormat.Alignment = wdAlignParagraphRight
  42. Selection.MoveDown Unit:=wdLine, Count:=2
  43. Selection.HomeKey Unit:=wdLine, Extend:=wdExtend
  44. Selection.Cut
  45. Selection.MoveUp Unit:=wdLine, Count:=2
  46. Selection.PasteAndFormat (wdFormatOriginalFormatting)
  47. Selection.MoveDown Unit:=wdLine, Count:=3
  48. Selection.EndKey Unit:=wdLine
  49. Selection.HomeKey Unit:=wdLine, Extend:=wdExtend
  50. Selection.Cut
  51. Selection.MoveUp Unit:=wdLine, Count:=3
  52. Selection.EndKey Unit:=wdLine
  53. Selection.MoveRight Unit:=wdCharacter, Count:=1
  54. Selection.PasteAndFormat (wdFormatOriginalFormatting)
  55. Selection.MoveDown Unit:=wdLine, Count:=4
  56. Selection.MoveLeft Unit:=wdCharacter, Count:=4, Extend:=wdExtend
  57. Selection.EndKey Unit:=wdLine
  58. Selection.MoveLeft Unit:=wdCharacter, Count:=4, Extend:=wdExtend
  59. Selection.Copy
  60. Selection.MoveUp Unit:=wdLine, Count:=5
  61. Selection.MoveDown Unit:=wdLine, Count:=1
  62. Selection.MoveLeft Unit:=wdCharacter, Count:=1
  63. Selection.TypeText Text:="/"
  64. Selection.PasteAndFormat (wdFormatOriginalFormatting)
  65. Selection.MoveUp Unit:=wdLine, Count:=1
  66. Selection.TypeParagraph
  67. Selection.MoveDown Unit:=wdLine, Count:=2
  68. Selection.Delete Unit:=wdCharacter, Count:=1
  69. Selection.ParagraphFormat.Alignment = wdAlignParagraphCenter
  70. Selection.MoveDown Unit:=wdLine, Count:=1
  71. Selection.ParagraphFormat.Alignment = wdAlignParagraphCenter
  72. Selection.MoveDown Unit:=wdLine, Count:=1
  73. Selection.EndKey Unit:=wdLine
  74. Selection.TypeParagraph
  75. Selection.TypeParagraph
Add Comment
Please, Sign In to add comment