p_davis
asked on
add powerpoint 11.0 object library
i would like to automatically include the powerpoint 11.0 object library in a macro so users don't have to manually add it by going to tools-->references
anyone have an idea how to do this?
anyone have an idea how to do this?
ASKER
all are on 2003 as of now and this is just a side project for my team. it won't be necessary to consider the future event of updating windows.
what security measures are you thinking of
if possible i would like something like c uses when you include libraries
#include 'some library'
what security measures are you thinking of
if possible i would like something like c uses when you include libraries
#include 'some library'
ASKER
by the way the macro is in excell
then you can try this
Application.VBE.ActiveVBPr oject.Refe rences.Add FromFile "c:\Program Files\Microsoft Office\OFFICE11\MSPPT.OLB"
not sure if it makes a difference but i had my macro security to low [as always ;-)]
Application.VBE.ActiveVBPr
not sure if it makes a difference but i had my macro security to low [as always ;-)]
ASKER
do i have to declare anything or just paste that at the beginning of my code?
i tried the latter with low security settings and i get the following runtime error
method 'vbe' of object '_Application' failed.
thanks for your help
i tried the latter with low security settings and i get the following runtime error
method 'vbe' of object '_Application' failed.
thanks for your help
tried it on 2 different machines and both worked fine with different OS and office versions
it was just an empty workbook, and one small sub
Sub h()
Application.VBE.ActiveVBPr oject.Refe rences.Add FromFile "D:\Program Files\Microsoft Office\Office10\MSPPT.OLB"
End Sub
not sure how the setup is there
it was just an empty workbook, and one small sub
Sub h()
Application.VBE.ActiveVBPr
End Sub
not sure how the setup is there
ASKER
strange,
windows xp pro//office 2003
and i had entered
Application.VBE.ActiveVBPr oject.Refe rences.Add FromFile "C:\Program Files\Microsoft Office\OFFICE11\MSPPT.OLB"
i even tried with() around the path.--same thing
i will try it outside of my code.
windows xp pro//office 2003
and i had entered
Application.VBE.ActiveVBPr
i even tried with() around the path.--same thing
i will try it outside of my code.
ASKER
nope,
tried it in a new workbook, new sub and i still get the same error. are you using 2003? i saw that in the last post you but office10
tried it in a new workbook, new sub and i still get the same error. are you using 2003? i saw that in the last post you but office10
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
that was it (trust access to visual basic project)
thanks so much
P
thanks so much
P
ASKER
i bumped the points up a bit
before you do that there are some questions
- are all users over on powerpoint 2003
- what happens if they upgrade or ave another version installed
- adding references in the macro probably requires take into account some security measures
why not develop your code with the reference added to use intellisense and early binding
and rollout with late binding
for a good discussion on the 2
source: http://support.microsoft.com/default.aspx?scid=kb;EN-US;245115
hope this helps a bit
bruintje