R
RB Smissaert
How do I in Word remove a broken (ticked in Tools, References, but showing
as Missing) reference?
I tried code like this:
Sub RemoveBrokenReferences()
Dim VBProj As Object
Dim oRef As Object
On Error Resume Next
Set VBProj = ThisDocument.VBProject
For Each oRef In VBProj.References
If oRef.IsBroken Then
VBProj.References.REMOVE oRef
End If
Next oRef
End Sub
and I also tried removing by name and by index number, but it all fails.
RBS
as Missing) reference?
I tried code like this:
Sub RemoveBrokenReferences()
Dim VBProj As Object
Dim oRef As Object
On Error Resume Next
Set VBProj = ThisDocument.VBProject
For Each oRef In VBProj.References
If oRef.IsBroken Then
VBProj.References.REMOVE oRef
End If
Next oRef
End Sub
and I also tried removing by name and by index number, but it all fails.
RBS