-
Notifications
You must be signed in to change notification settings - Fork 0
/
IfSG.bas
46 lines (41 loc) · 1.52 KB
/
IfSG.bas
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
Attribute VB_Name = "IfSG"
Sub Aktenzeichen()
az = ActiveDocument.Tables(1).Cell(5, 3).Range.Text
Pos = InStr(az, "ROF")
If Pos > 1 Then
ActiveDocument.Tables(1).Cell(5, 3).Range.Text = Mid(az, Pos, Len(az) - Pos - 1)
End If
End Sub
Sub Edit1()
Dim ud As UndoRecord
Set ud = Application.UndoRecord
ud.StartCustomRecord ("IfSG.Edit1")
Aktenzeichen
ActiveDocument.Tables(1).Cell(2, 1).Range.Paragraphs(3).Range.Delete
ActiveDocument.Tables(1).Cell(13, 3).Range.Text = Format(Date, "DD.MM.YYYY ")
Selection.EndKey Unit:=wdStory
Selection.MoveRight Unit:=wdCharacter, Count:=1
Selection.MoveUp Unit:=wdLine, Count:=1, Extend:=wdExtend
Selection.HomeKey Unit:=wdLine, Extend:=wdExtend
Selection.Delete Unit:=wdCharacter, Count:=1
Selection.MoveUp Unit:=wdLine, Count:=6
Selection.TypeParagraph
Selection.TypeText Text:="Ihre Regierung von Oberfranken"
ud.EndCustomRecord
End Sub
Sub Edit2()
Dim ud As UndoRecord
Set ud = Application.UndoRecord
ud.StartCustomRecord ("IfSG.Edit1")
Aktenzeichen
ActiveDocument.Tables(1).Cell(13, 3).Range.Text = Format(Date, "DD.MM.YYYY ")
Selection.EndKey Unit:=wdStory
Selection.MoveRight Unit:=wdCharacter, Count:=1
Selection.MoveUp Unit:=wdLine, Count:=1, Extend:=wdExtend
Selection.HomeKey Unit:=wdLine, Extend:=wdExtend
Selection.Delete Unit:=wdCharacter, Count:=1
Selection.MoveUp Unit:=wdLine, Count:=6
Selection.TypeParagraph
Selection.TypeText Text:="Ihre Regierung von Oberfranken"
ud.EndCustomRecord
End Sub