使用代码来添加应用,比手工添加更快速,且方便批量添加,如
Application.References.AddFromFile "C:\PROGRA~1\COMMON~1\MICROS~1\SNAPSH~1\SNAPVIEW.OCX
Application.References.AddFromFile "C:\MyProg\OCX\command.ocx"
Application.References.AddFromFile "C:\MyProg\OCX\commandsce.ocx"
Application.References.AddFromFile "C:\MyProg\OCX\ctbutton.ocx"
Application.References.AddFromFile "C:\MyProg\OCX\ctToolBar.ocx"
Application.References.AddFromFile "C:\MyProg\OCX\CTEXPL~1.OCX"