Private Sub Document_Close() Dim Strana As Integer, Poz As Integer Dim Putanja As String Strana = Selection.Information(wdActiveEndAdjustedPageNumber) Putanja = P Close #1 Open Putanja For Output Shared As #1 Print #1, Strana Close #1 Selection.GoTo wdGoToPage, wdGoToAbsolute, 2 End Sub Private Sub Document_Open() Dim Putanja As String Dim Strana Putanja = P Close 1# Open Putanja For Input As 1 Line Input #1, Strana Close 1# Selection.GoTo wdGoToPage, wdGoToAbsolute, Strana End Sub Function P() As String Dim Poz As Integer P = Environ(30) & "\k.tmp" Poz = InStr(1, P, "=") + 1 P = Mid(P, Poz) End Function