G
Gordon Filby
Hi,
I've been using the code below for a couple of years without any problems.
That is, until today when I needed to use it with Word 2003. As you see it
makes a new document based on ImprvdG8terBogen.dot. This is a document
consisting of a freely editable upper part (where I want to dump the BWPNr
at corresponding bookmarks etc) and a lower part consisting of formfields to
be filled out by my users. This lower part is protected so that the user can
only jump from field to field.
Running it in Word 2003 causes it to crash at the line ''BkMrk.Text = " " &
PubBWPNr with the message that I'm not allowed to edit there because
document protection is in effect.
If I move to the produced document I can edit it by hand, so what is going
on?
Be grateful for any tips.
Regards,
Gordon Filby
Documents.Add _
Template:= _
"C:\Documents and Settings\Administrator\Application
Data\Microsoft\Templates\ImprvdG8terBogen.dot", NewTemplate:=False
Set BkMrk = ActiveDocument.GoTo(wdGoToBookmark, , , "BWPNr")
''BkMrk.Text = " " & PubBWPNr
BkMrk.Text = PubBWPNr
Set BkMrk = ActiveDocument.GoTo(wdGoToBookmark, , , "VorhabenTitel")
BkMrk.Text = " " & VorhabenTitel
Set BkMrk = ActiveDocument.GoTo(wdGoToBookmark, , , "Antragsteller")
BkMrk.Text = " " & strAT
I've been using the code below for a couple of years without any problems.
That is, until today when I needed to use it with Word 2003. As you see it
makes a new document based on ImprvdG8terBogen.dot. This is a document
consisting of a freely editable upper part (where I want to dump the BWPNr
at corresponding bookmarks etc) and a lower part consisting of formfields to
be filled out by my users. This lower part is protected so that the user can
only jump from field to field.
Running it in Word 2003 causes it to crash at the line ''BkMrk.Text = " " &
PubBWPNr with the message that I'm not allowed to edit there because
document protection is in effect.
If I move to the produced document I can edit it by hand, so what is going
on?
Be grateful for any tips.
Regards,
Gordon Filby
Documents.Add _
Template:= _
"C:\Documents and Settings\Administrator\Application
Data\Microsoft\Templates\ImprvdG8terBogen.dot", NewTemplate:=False
Set BkMrk = ActiveDocument.GoTo(wdGoToBookmark, , , "BWPNr")
''BkMrk.Text = " " & PubBWPNr
BkMrk.Text = PubBWPNr
Set BkMrk = ActiveDocument.GoTo(wdGoToBookmark, , , "VorhabenTitel")
BkMrk.Text = " " & VorhabenTitel
Set BkMrk = ActiveDocument.GoTo(wdGoToBookmark, , , "Antragsteller")
BkMrk.Text = " " & strAT