Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / November 2006

Tip: Looking for answers? Try searching our database.

VBA reference problem

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Tobias Schröer - 27 Nov 2006 13:45 GMT
Hi folks,

I have two word template projects.
One is loaded globally from the autostart folder you can specify in the
word options. This one contains a toolbar button by which the user can
add a signature graphic file to the document and some basic methods
(like "take the current document, save it and do something with it").

The other is a document template with some form fields and a toolbar
button. When pressing the button, the form fields are read and one of
the global template's methods is invoked. To be able to cll the global
template's method, I need to reference that template. The global
template can be found on a network resource, like \\MyServer\Templates.

Everything works perfectly fine on my developing machine.
When a user now clicks the button on his machine, he gets a compiler
error message, that says that the global template project cannot be
found. When I check the references, I have an entry like "Missing:
~w????.tmp". Back on my developing machine, the reference now points to
the user temp folder and not to the network share anymore. Though,
everything still works fine.

How do I reference a template from a networkshare correctly? Merging the
global template's code to the second template is not an option. There is
a third, fourth, ... template as well (all with the same problems). And
I want to avoid the maintainance effords :)

Thanks for any suggestions,
Tobi
nobody - 27 Nov 2006 17:07 GMT
Trivial question: Does the user has the rights to the network share?
Alex.

> Hi folks,
>
[quoted text clipped - 24 lines]
> Thanks for any suggestions,
> Tobi
Tobias Schröer - 28 Nov 2006 13:56 GMT
nobody schrieb:
> Trivial question: Does the user has the rights to the network share?
> Alex.

Trivial answer: yes, he can open the template ;)
As said, the tool bar button is available. And the user's groups hass
access rights on the share.

Meanwhile I did some investigation by my self. What I have found, is
that if I remove the reference from the template project and load the
reference explicitly before invoking any of its methods, it works!

I wonder if I should remove the reference after the marco has run.
Suppose User A creates a new document on the doc template and runs the
macro (which adds the reference). The user A saves the document. Now
user B opens the document and wants to run the macro again. I need to
test this, but I fear I will be facing the same problem again, if the
reference is set.

>>Hi folks,
>>
[quoted text clipped - 24 lines]
>>Thanks for any suggestions,
>>Tobi

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.