L
LA Lawyer
I am trying to assign CustomProperties from Access 2007. I have all of the
proper references and am able to work on Word documents (otherwise) from
Access VBA. Here is my code:
With Word.ActiveDocument.CustomDocumentProperties
.Add Name = "CaseID", Type:=msoPropertyTypeNumber, Value:=TheCaseID,
LinktoContent:=False
.Add Name = "CaseName", Type:=msoPropertyTypeString, Value:=theCaseName,
LinktoContent:=False
End With
When I run this, Access reports that "variable not defined" when it
encounters "msoPropertyTypeNumber". When I put quote marks around that,
nothing happens.
What am I doing wrong? What is the fix?
proper references and am able to work on Word documents (otherwise) from
Access VBA. Here is my code:
With Word.ActiveDocument.CustomDocumentProperties
.Add Name = "CaseID", Type:=msoPropertyTypeNumber, Value:=TheCaseID,
LinktoContent:=False
.Add Name = "CaseName", Type:=msoPropertyTypeString, Value:=theCaseName,
LinktoContent:=False
End With
When I run this, Access reports that "variable not defined" when it
encounters "msoPropertyTypeNumber". When I put quote marks around that,
nothing happens.
What am I doing wrong? What is the fix?