Consulting

Results 1 to 6 of 6

Thread: Add permanent GUID. to a Template.

  1. #1
    VBAX Regular
    Joined
    Nov 2006
    Posts
    16
    Location

    Add permanent GUID. to a Template.

    Would anybody be able to provide some assistance with assigning a user defined GUID to a template.

    using code like
         'Update the GUID you need below.
        strGUID = "{00020905-0000-0000-C000-000000000046}"          'Add the reference 
               ThisWorkbook.VBProject.References.AddFromGuid _      GUID:=strGUID, Major:=0, Minor:=0

    Background:


    I am building a common reference library for Multiple MS host applications. The intention is to set the reference to this common reference library by VBA and permanent GUID.
    It is already possible to add a reference from a file , but that provides no control over the actual GUID used. It is intended to add a known GUID to newly developed templates to reduce template bloat and template maintenace workload.

    The critical part of this process is being able to transport this defined GUID between multiple systems.
    Greg

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Not sure what the question is. If you are trying to add a reference to a known GUID, that should be portable, the same on all systems.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  3. #3
    VBAX Regular
    Joined
    Nov 2006
    Posts
    16
    Location
    I want to create a GUID and apply it to a WORD VBA template. The GUID does not yet exist.

    The critical part of this process is being able to transport this defined GUID between multiple systems.
    Greg

  4. #4
    VBAX Wizard
    Joined
    May 2004
    Posts
    6,713
    Location
    Well creating the GUID is straightforward. However, it is the "applying" it that may be an issue. I am not sure how you would go about doing that. A document property perhaps. I also do not know what you mean by transporting between systems. I suppose that would depend directly on how you find a way to "apply" it.

  5. #5
    VBAX Regular
    Joined
    Nov 2006
    Posts
    16
    Location
    I was trying to avoid generating a different GUID everytime when installing a reference from a file on different computer.
    Greg

  6. #6
    VBAX Wizard
    Joined
    May 2004
    Posts
    6,713
    Location
    But if it is a template file, you make the reference by name, not GUID. Or rather, you invoke a template file (I assume you are using it as a code container, a global template) by using it as an add-in, by name. VBA project references are different. I am not quite following.
    It is intended to add a known GUID to newly developed templates to reduce template bloat and template maintenace workload.
    Please clarify this as I am not seeing how template bloat would be affected. As for maintenance, if you are talking about multiple computers on a network, having a template (as a global) on a server accessed by multiple computers is not a problem.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •