R L
R L

Reputation: 55

References object only in access?

is the

References object

only available in Access, not in Word ?

I set the reference MS VBA Extensibility 5.3, but

Dim objReference As Reference
For Each objReference In References

gives the error 'need object'.

Upvotes: 0

Views: 93

Answers (2)

Domenic
Domenic

Reputation: 8104

Try qualifying References as follows...

For Each objReference In ActiveDocument.VBProject.References

or

For Each objReference In ThisDocument.VBProject.References

or

For Each objReference In Documents("Document1.docm").VBProject.References

Upvotes: 1

JNevill
JNevill

Reputation: 50034

I believe you will need to add a reference to the "Microsoft Visual Basic for Applications Extensibility 5.3 library" to get this working:

enter image description here

Upvotes: 0

Related Questions