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 / February 2005

Tip: Looking for answers? Try searching our database.

Problem with reference being replicated **Repost from Addins**

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
JB - 03 Feb 2005 10:36 GMT
**Orig post in addins but no help offered.**

Hi Folks,
I have a template set which I use to attatch addins to a new/existing
document.  My users are spread all over the place and do not have the
same environment/shares so this means I have multiple "copies" of teh
addin stored on admin shares.

What I do at the moment is determine (via registry settings) what they
have mapped to my addin location and add a reference to the addin using

MyProject.ThisDocument.VBProject.References.AddFromFile
AddinLocationandName which works fine and every new document based on
the template has the addin available to them.

Problem is that these docuemnts may be passed around environments which
makes the reference no longer valid as it's not on the same share.  I
have a utility that allows them to open the doc which removes attached
template and adds the new addin location using

ActiveDocument.AttachedTemplate = "" and

addNo = AddIns.Count
For i = addNo To 1 Step -1
    temp = AddIns.Item(i)
        If temp = AddinName Then
            AddIns.Item(i).Delete
        End If
    Next i

addtemp:
    With ActiveDocument
        .UpdateStylesOnOpen = True
        .AttachedTemplate = Template(0)
    End With
        AddIns.Add FileName:=Template(1), Install:=True

This kinda works but I find myself with 2 addins installed if I look in
Tools > Templates and Addins, and I think it's something to do with not
removing the previous reference which I can't seem to do.

Any pointers???

Cheers

J
Tom Winter - 03 Feb 2005 14:50 GMT
Gee, i should have looked up one message before replying to your other one!
Signature

Tom Winter
tom@nospam.amosfivesix.com

> **Orig post in addins but no help offered.**
>
[quoted text clipped - 42 lines]
>
> J

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.