Project Reference

J

Jean D

Good morning.

I am using Word 2007 on WindowsXP SP2. I have a template project that was
created in Word 2000. It has a reference to a template in startup in which
I keep my main subroutines. All was well until I decided to now reference
a different template in startup. When I try to add it in 2007, I get the
error "Requested type library or wizard is not a VBA project".

Can you no longer use a reference to a template in version 2007 or have I
forgotten how the heck I did this?

Thanks very much!
 
T

TFTAJLLYMXZP

Good morning.

I am using Word 2007 on WindowsXP SP2.  I have a template project that was
created in Word 2000.  It has a reference to a template in startup in which
I keep my main subroutines.  All was well until I decided to now reference
a different template in startup.  When I try to add it in 2007, I get the
error "Requestedtype library or wizardis not a VBA project".

Can you no longer use a reference to a template in version 2007 or have I
forgotten how the heck I did this?

Thanks very much!  

Hi Jean,

I don't have solution for you, but I am in the same position. Here at
work with Office 2007 and Vista Enterprise I cannot seem to set a
Reference to ANY template, regardless of its folder location, or its
vintage. However, using EXACTLY the same files on my home system -
Office 2007 and Vista Home Premium - I can set the Reference.

To me, this suggests our corporate security environment is somehow
getting in the way. Our support staff have not been successful in
tracking down this problem, but if they do, I will try to remember to
post back here with the news. Please let the group know if you find a
fix, or an explanation of why this occurs.

Cheers,

Terry
 
D

Doug Robbins - Word MVP on news.microsoft.com

Use

Application.Run "[TemplateName].[ModuleName].[RoutineName]"

Replace the square brackets and the items within them with the actual names
of the relevant items.


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com
 
J

Jean D

Well that is very interesting! I never thought of the network being the
culprit, but my problem is indeed on a corporate network also. I didn't
think to try it at home.

Don't laugh, but here was my low-tech workaround. I have a stand-alone
machine for testing that has Word 2000 on it. I relabeled my USB drive
letter to match my network startup directory, put my global template in it,
and made a blank template with a reference to it. Now since 95% of my need
is to reference routines in that same global template, I just make my new
templates off a copy of that blank template and I'm set. The things we do
to get by!

Thank you so much for the info. and I will definitely also post back if we
find the problem.

Jean
 
J

Jean D

I did try that, but without a reference, it fails to recognize any of the
variables I have set in the main template (variable not defined error).
With a reference, I can set all of my variables in an initial declaration
and have them recognized. Without it, would I have to declare them in each
routine?

Thanks!
 
D

Doug Robbins - Word MVP on news.microsoft.com

Try declaring them as Public

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com

Jean D said:
I did try that, but without a reference, it fails to recognize any of the
variables I have set in the main template (variable not defined error).
With a reference, I can set all of my variables in an initial declaration
and have them recognized. Without it, would I have to declare them in
each
routine?

Thanks!


Use

Application.Run "[TemplateName].[ModuleName].[RoutineName]"

Replace the square brackets and the items within them with the actual
names
of the relevant items.
 
J

Jean D

Unfortunately they are all public. It still doesn't recognize them without
the project reference.

But thank you!
 
D

Dan.KSU

Unfortunately they are all public.  It still doesn't recognize them without
the project reference.

But thank you!



- Show quoted text -

This seems to be some of the same issues that I am having (http://
groups.google.com/group/microsoft.public.word.vba.general/
browse_thread/thread/802e778c062b94cd/c2b7aaae2291fd25?hl=en)
If you read about the issue I am having, one of my recent attempts was
to remove the referenced template from the file and then add it back.
Now it won't let me add it back. Not sure if any of you guys have had
any luck?
Thanks,
Daniel
 
D

Doug Robbins - Word MVP on news.microsoft.com

Has a specific name been assigned to the addin project? If not, under
Tools>References in the VBE, depending upon how many templates you have in
the Word Startup Folder, you may find a whole bunch of (un-named) "Project"
entries.

However you do not need to create a specific reference to the add-in to be
able to use the code in it as you can use

Application.Run "ProjectName.ModuleName.MacroName"



--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com
 

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