H
Herve cadieu
Hi all
I would like that my template.dot which creates a new document
within a vbproj(document1) can add a module class within the new document
programmatically from file "c:\theclass.cls"
I cannot figure out the appropriate code , can someone help me ?
'Sub AddModuleClassinMyproject( classname,path)
Dim v As Integer
v=
activedocument.VBProject.VBE.ActiveVBProject.VBE.CodePanes.item.VBE.CodePanes.count
activedocument.VBProject.VBE.ActiveVBProject.VBE.CodePanes.item(v).
..CodeModule.AddFromFile path+className'
activedocument.VBProject.VBComponents("EventClassmodule").CodeModule.AddFromFile path+className
'
'End Sub
I would like that my template.dot which creates a new document
within a vbproj(document1) can add a module class within the new document
programmatically from file "c:\theclass.cls"
I cannot figure out the appropriate code , can someone help me ?
'Sub AddModuleClassinMyproject( classname,path)
Dim v As Integer
v=
activedocument.VBProject.VBE.ActiveVBProject.VBE.CodePanes.item.VBE.CodePanes.count
activedocument.VBProject.VBE.ActiveVBProject.VBE.CodePanes.item(v).
..CodeModule.AddFromFile path+className'
activedocument.VBProject.VBComponents("EventClassmodule").CodeModule.AddFromFile path+className
'
'End Sub