Results 1 to 8 of 8
  1. #1
    Lounger
    Join Date
    Jan 2001
    Location
    NJ, USA
    Posts
    36
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Copy all wdOrganizerObjects (Office 2000)

    Hi!

    Is it possible to copy all macros project items and toolbars from a template to the active document without specifying how many/what? In other words, we have a function that creates a new document based on a template that is selected by a user, then breaks the link to the template (we do this to ensure that we can update the template when we need to). If custom macros or toolbars are included in the template, we want to ensure they are copied to the new active document from the template, but this could vary based on the selected template. So we would like to be able to copy any macro or toolbar without needing to specify how many exist, or the names of the items. Is this possible? Please let me know if you need any additional information.

    Thanks in advance!
    magella

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

    Re: Copy all wdOrganizerObjects (Office 2000)

    There is (at least) one fundamental problem here: a document can't contain AutoText entries, they can only be stored in a template. Copying modules and toolbars to each document may cause considerable bloat in the file size of the documents. Are you sure that you want to pay this price?

  3. #3
    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: Copy all wdOrganizerObjects (Office 2000)

    You can learn the names of the objects by interrogating other collections (e.g., CommandBars, VBE library), but I don't think you can use the OrganizerCopy method without knowing the actual names.

  4. #4
    Super Moderator
    Join Date
    Dec 2000
    Location
    New York, NY
    Posts
    2,970
    Thanks
    3
    Thanked 29 Times in 27 Posts

    Re: Copy all wdOrganizerObjects (Office 2000)

    Magella,

    This sounds so different from anything I've heard of before, that I can't help but want to question why you would want to do it this way.
    It seems like putting the cart before the horse, to abandon the document/template architecture that MS designed into Word, in order to make updating the templates easier - seems like you're only more likely to cause problems in the process.

    As Hans pointed out, putting all of the template content into the document instead, is going to make all of your documents much bigger and bloated (and also as Hans pointed out, you will not be able to store autotexts in the document).

    It also seems like you're setting yourself up for a maintenance nightmare, as essentially each document will be a template unto itself.
    Suppose you find an error in a macro that is in your template, or simply want to update or upgrade some feature - if you keep the documents linked to a template, you need only make this change in one place - the template. If you unlink the documents from the template, then you will have no effective way to update the code, toolbars and other content in each individual document.

    Depending on what kind of network setup you have, there should be a variety of ways to successfully push out updates to the templates, particularly if the templates are kept in a shared, read-only workgroup templates directory on a network.

    Gary

  5. #5
    5 Star Lounger kmurdock's Avatar
    Join Date
    Feb 2003
    Location
    Pacific Grove, California, USA
    Posts
    716
    Thanks
    10
    Thanked 34 Times in 28 Posts

    Re: Copy all wdOrganizerObjects (Office 2000)

    Hi Magella,

    I have done this kind of thing from template to template; you can iterate through all commandbars and styles with a For each statement, but I specified the macro projects by name -- seems to me I had problems trying to copy any and all projects.

    Further, some anti-virus programs find this kind of thing *extremely* alarming and might not even permit loading the template with the code in it, let alone stop you from using it without disabling auto-detect.

    I have to agree that the template/document connection is a valuable one and trying to do an end run around it may lead to disappointment -- are you trying to make your documents as portable as possible?

    Kim

  6. #6
    Lounger
    Join Date
    Jan 2001
    Location
    NJ, USA
    Posts
    36
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Copy all wdOrganizerObjects (Office 2000)

    Hi Everyone,

    Thanks for your responses. The reason that we started breaking the template/document connection is that it was difficult to make any changes to the templates. People would open a document based on a template and then leave it open for days, which would prevent us from updating the template as it was "in use". We used to be a company of only 140 people, but we were recently acquired by much larger company, and they want to use our templates. So, if we had problems with only 140 people using templates, we now have to worry about 3,000 people globally. I have no control over the network and no nothing about how it is set up, but is there any other way to prevent this? People expect updated templates "immediately", and we have no way of knowing when we can update a template if someone has it in use. I know that copying items into documents can cause them to be larger than desired, but we have not found any other way around this issue. Please - I am open for any other suggestions you may have!

    Thanks,
    magella

  7. #7
    Super Moderator
    Join Date
    Dec 2000
    Location
    New York, NY
    Posts
    2,970
    Thanks
    3
    Thanked 29 Times in 27 Posts

    Re: Copy all wdOrganizerObjects (Office 2000)

    Magella,

    I understand the problem, unfortunately can't point to a quick solution from my own personal experience: at my former employer, I was sheltered from the details of how they achieved updates, but we were running Windows terminal services so I believe it was relatively easy to swap users' sessions from one server to another in order to perform updates on an unused server.

    This issue must come up at every large firm, so I'm hoping someone will post with a workable answer. One option, which would satisfy your users who want the regular updates, but at the expense of annoying other users, would be to broadcast a regular weekly time for template updates (say at 4am Sunday), letting all users know that any network sessions left open at that time will be forced closed.

    Gary

  8. #8
    Lounger
    Join Date
    Jan 2001
    Location
    NJ, USA
    Posts
    36
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Copy all wdOrganizerObjects (Office 2000)

    Hi Gary - thanks again for your response. We will definitely need to put some more thought into this - it's just that we are still so new to this company and it's hard to know who we can even ask for assistance!

    Thanks again,
    magella

Posting Permissions

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