J
Janice
Hi All,
I want to write a program in VBA that remove broken references to documents
and then re establishes the reference. This is needed because the template
has changed name and moved to another server.
The code below does remove the broken reference. It even adds the
reference, but it does not work!
<SNIP>
For Each refTest In prjProj.References
If refTest.IsBroken Then prjProj.References.Remove refTest
Next refTest
ActiveDocument.VBProject.References.AddFromFile "C:\PO_TEMP.DOT"
</SNIP>
Documents based on the PO_TEMP.DOT should display a floating toolbar etc
when opened. However this is not displaying if I add the reference to the
existing documents.
A point to note is this. When I open the VBE with a document based on this
template, the project is not listed in the Projects tree. Then when going
into the References screen the project is allready selected so I exit and
then the project displays in the tree. However clicking on the project
gives an error "project is unviewable"
Can anybody possibly help me on this. I'm going a bit crazy!
Thanks
Janice Hardy
Support Officer
Hently and Hently Distributors
I want to write a program in VBA that remove broken references to documents
and then re establishes the reference. This is needed because the template
has changed name and moved to another server.
The code below does remove the broken reference. It even adds the
reference, but it does not work!
<SNIP>
For Each refTest In prjProj.References
If refTest.IsBroken Then prjProj.References.Remove refTest
Next refTest
ActiveDocument.VBProject.References.AddFromFile "C:\PO_TEMP.DOT"
</SNIP>
Documents based on the PO_TEMP.DOT should display a floating toolbar etc
when opened. However this is not displaying if I add the reference to the
existing documents.
A point to note is this. When I open the VBE with a document based on this
template, the project is not listed in the Projects tree. Then when going
into the References screen the project is allready selected so I exit and
then the project displays in the tree. However clicking on the project
gives an error "project is unviewable"
Can anybody possibly help me on this. I'm going a bit crazy!
Thanks
Janice Hardy
Support Officer
Hently and Hently Distributors