Daedal1
09-16-2015, 11:55 AM
Working in Word 2010; have a procedure that uses FileSystemObject so I need to reference Scripting Runtime (scrrun.dll). Want to use VBA to make sure scripting is available so I can distribute the procedure.
My References list looks like this:
14404
Code to list available References looks like this:
Sub ListRefs()
Dim ref As Reference
Dim sRefs As String
With ActiveDocument.VBProject
sRefs = "There are " & .References.Count & " references listed:" & vbCrLf
For Each ref In .References
sRefs = sRefs & " " & ref.Name & vbCrLf
Next ref
End With
MsgBox sRefs
End Sub
MsgBox displays this:
14405
Questions:
1) How come only 5 of the 9 references are available thru the object model?
2) I'm open to recommendations on the optimal way to accomplish what I hope to accomplish if I'm going about this the hard way (my tendency).
Thanks in advance for any light you can shed on this.
Scot
My References list looks like this:
14404
Code to list available References looks like this:
Sub ListRefs()
Dim ref As Reference
Dim sRefs As String
With ActiveDocument.VBProject
sRefs = "There are " & .References.Count & " references listed:" & vbCrLf
For Each ref In .References
sRefs = sRefs & " " & ref.Name & vbCrLf
Next ref
End With
MsgBox sRefs
End Sub
MsgBox displays this:
14405
Questions:
1) How come only 5 of the 9 references are available thru the object model?
2) I'm open to recommendations on the optimal way to accomplish what I hope to accomplish if I'm going about this the hard way (my tendency).
Thanks in advance for any light you can shed on this.
Scot