Results 1 to 4 of 4
  1. #1
    5 Star Lounger
    Join Date
    Mar 2001
    Location
    New York, NY
    Posts
    922
    Thanks
    2
    Thanked 12 Times in 11 Posts

    Global template (Word XP)

    I have a template of functions, etc. which loads from the Word Startup folder. Other global templates reference this template for functions which they share in common. I want to be sure that this template isn't used by unauthorized parties, and have included an AutoExec macro which checks for the presence of particular files to ensure that it's installed on a PC that is "authorized", so to speak.

    If those files are not found, I cycle through the add-ins collection and unload this template. There's one problem with that.... if the name of the template has been changed, my code won't recognize it.

    Is there a way for me to determine the name of the "current" template that is loading.... sort of a Me.Name property?

    I know that I could build in some sort of key in the Registry to protect my template from anauthorized use, but the very people who would do the distribution of this registry key would also be the suspects.... sad to say.

    Thanks,
    Richard Barrett

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Global template (Word XP)

    Try ThisDocument.Name.

  3. #3
    5 Star Lounger
    Join Date
    Mar 2001
    Location
    New York, NY
    Posts
    922
    Thanks
    2
    Thanked 12 Times in 11 Posts

    Re: Global template (Word XP)

    Perfect! Thank you so much.

    Richard

  4. #4
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Global template (Word XP)

    You can use this one too:

    Application.MacroContainer.FullName

    I'm not sure I could tell you the difference...

Posting Permissions

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