M
Mark
Hi,
I am attempting to extract a portion of a document's
header data which appears to work correctly in the debug
window (I only need line one of two lines - the lines are
seperated by a carriage return). However, when I try to
pass the data to Access (97) I get a Dr.Watson error. The
relevant code is posted below. Any help would be greatly
appreciated! Thanks.
Mark
With ContractRecord
.AddNew
ActiveDocument.Unprotect
.Fields("CONTRACT_TYPE") =
ActiveDocument.Sections(1).Headers
(wdHeaderFooterPrimary).Range.Paragraphs(1)--> Dr.Watson
ActiveDocument.Protect
Type:=wdAllowOnlyFormFields, NoReset:=True
.Update
End With
ContractRecord.Close
Set ContractDataBase = Nothing
I am attempting to extract a portion of a document's
header data which appears to work correctly in the debug
window (I only need line one of two lines - the lines are
seperated by a carriage return). However, when I try to
pass the data to Access (97) I get a Dr.Watson error. The
relevant code is posted below. Any help would be greatly
appreciated! Thanks.
Mark
With ContractRecord
.AddNew
ActiveDocument.Unprotect
.Fields("CONTRACT_TYPE") =
ActiveDocument.Sections(1).Headers
(wdHeaderFooterPrimary).Range.Paragraphs(1)--> Dr.Watson
ActiveDocument.Protect
Type:=wdAllowOnlyFormFields, NoReset:=True
.Update
End With
ContractRecord.Close
Set ContractDataBase = Nothing