Hallo Thomas
Post by Thomas GahlerPost by Gianni Fasciatidies gelich beim Öffnen des Formulars erfolgen soll, habe ich mein Makro,
dass die DDE-Felder aktualisiert "AutoOpen" benannt. Falls ich die Vorlage
über Word öffne wird das Makro ausgeführt, falls ich aber ein ".doc" aus
der
Post by Gianni FasciatiVorlage erstelle funktioniert es nicht mehr.
Dann muss das Makro 'AutoNew()' heissen...
Das Makro 'AutoNew' (siehe unten) funktioniert zwar wenn ich das ".doc" mit
Öffnen aus dem Windows-Explorer erstelle. Wird die Vorlage aber aus dem
Datenbank-Programm (Sokrates) aufgerufen, funktioniert es aber nicht.
Sub AutoNew()
'
' AutoNew Makro
' Makro aufgezeichnet am 03.02.2006 von ewp
'
Selection.Fields.Update
Selection.MoveDown Unit:=wdLine, Count:=4
Selection.MoveDown Unit:=wdLine, Count:=4, Extend:=wdExtend
Selection.Fields.Update
Selection.MoveDown Unit:=wdLine, Count:=2, Extend:=wdExtend
Selection.MoveDown Unit:=wdLine, Count:=2
Selection.MoveDown Unit:=wdLine, Count:=4, Extend:=wdExtend
ActiveWindow.ActivePane.SmallScroll Down:=17
Selection.Fields.Update
Selection.WholeStory
ActiveDocument.Sections(1).ProtectedForForms = False
ActiveDocument.Sections(2).ProtectedForForms = False
ActiveDocument.Sections(3).ProtectedForForms = True
ActiveDocument.Sections(4).ProtectedForForms = False
ActiveDocument.Sections(5).ProtectedForForms = True
ActiveDocument.Sections(6).ProtectedForForms = False
ActiveDocument.Sections(7).ProtectedForForms = True
ActiveDocument.Sections(8).ProtectedForForms = False
ActiveDocument.Sections(9).ProtectedForForms = True
ActiveDocument.Sections(10).ProtectedForForms = False
ActiveDocument.Sections(11).ProtectedForForms = True
ActiveDocument.Sections(12).ProtectedForForms = True
ActiveDocument.Sections(13).ProtectedForForms = True
ActiveDocument.Protect Password:="PLBtest", NoReset:=False, Type:= _
wdAllowOnlyFormFields
End Sub