PHP User Warning: fetch_template() calls should be replaced by the vB_Template class. Template name: bbcode_highlight in ..../includes/functions.php on line 4197
[RESOLVED] Remove Template/Macros-VBForums
Results 1 to 4 of 4

Thread: [RESOLVED] Remove Template/Macros

  1. #1

    Thread Starter
    Frenzied Member agmorgan's Avatar
    Join Date
    Dec 2000
    Location
    Lurking
    Posts
    1,383

    Resolved [RESOLVED] Remove Template/Macros

    I have set up a Word template (.dot) file that presents the user with a form to enter relavent detail.
    The macro then enters the text in the correct places in the new document that is created.

    However, a link to the .dot file is still present and when someone else tries to open it they get the Disable/Enable macro warning.

    If I delete/move the .dot file after the new document has been created, the normal template is used, which is fine as there is no special style/formatting in the .dot.

    Is there any way to remove the reference to the initial template once the new file has been created?

  2. #2
    Lively Member
    Join Date
    Apr 2005
    Posts
    103

    Re: Remove Template/Macros

    Do you actually delete the .DOT file or just delete what's in the Document Template field in Tools, Templates and Add-ins?

  3. #3

    Thread Starter
    Frenzied Member agmorgan's Avatar
    Join Date
    Dec 2000
    Location
    Lurking
    Posts
    1,383

    Re: Remove Template/Macros

    At the moment, I just noticed that the .DOC file contains macros when the .DOT file is in its original location and it doesn't when the .DOT file is moved.
    I want this template to be used by several people, so it isn't going to be deleted after I create the .DOC file.

    I guess what I am looking for is a way to break the association to the .DOT file through code.

  4. #4

    Thread Starter
    Frenzied Member agmorgan's Avatar
    Join Date
    Dec 2000
    Location
    Lurking
    Posts
    1,383

    Re: Remove Template/Macros

    This fixes it.
    VB Code:
    1. With ActiveDocument
    2.         .UpdateStylesOnOpen = False
    3.         .AttachedTemplate = ""
    4.     End With
    Where was RobDog888 with this answer?

Posting Permissions

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



Featured


Click Here to Expand Forum to Full Width