Good morning loungers
I want to add a reference to a project with vba. The equivalent to selecting Tools | References in the vba editor.
I have the following in Template A.
Sub document_new()
Dim strLibrary as string
strLibrary = ActiveDocument.AttachedTemplate.Path & “library.dot”
AddIns.Add FileName:=strLibrary
library.Module1.show_form
End Sub
This works well as long as Template A has been saved with the reference to Library.dot checked under tools | references in the vba editor.
I was hoping to add the reference with code using the .addfromfile method. Something like this
vbProj.references.addFromFile(strLibrary)
Anyway I can not make it happen
Any assistance would be appreciated.
Geof