Reference a function of a project dynamically

N

Nicolas Rabaté

Hello,

I'm wondering whether it is feasible to reference a function of another
project dynamically.

Here is the piece of code

Project A : a reference is set to project B
-----------------------------------------
Dim o1 as IPictureDisp
set o1 = ProjectB.Module.myform(1)

Project B/Module
------------------
Public Function myform (v as Integer) as IPictureDisp
Dim uf as pics
set uf = new pics
set myform = uf.imglist.ListImages(1).Picture
set uf = nothing
End function

As it is this code sample works fine.

Project A : the reference to Project B is not set
 
W

Word Heretic

G'day "Nicolas Rabaté" <[email protected]>,

ActiveDocument.VBProject.References.AddFromFile

Steve Hudson
Word Heretic Sydney Australia
Tricky stuff with Word or words

Email: WordHeretic at tpg.com.au


Nicolas Rabaté was spinning this yarn:
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top