Results 1 to 5 of 5
  1. #1
    New Lounger
    Join Date
    Aug 2008
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Refence to template (office 2003)

    Hi guys. I'm working on an application there should open between 120.000 - 150.000 documents to check content. All docs are based on costum templates with code in doc.open, but this should not be executed in this case. Can this reference be removed by code. That would in my enviroment be much easier than rename/remove the templates to make the doc's use normal.dot.
    /Søren

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

    Re: Refence to template (office 2003)

    You can prevent execution of automatic macros such as AutoOpen and Document_Open by placing the following line before opening the documents:

    WordBasic.DisableAutoMacros 1

    You can turn on execution of automatic macros again when you're done using the line

    WordBasic.DisableAutoMacros 0

  3. #3
    New Lounger
    Join Date
    Aug 2008
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Refence to template (office 2003)

    Hi Hans . god damn you are fast .. ;o}.
    I have the wordapp.WordBasic but I can only see the WordBasic as an object. There is no DisableAutoMacros proberty. Do I miss an Include?? I'm using C# .net version 2.0 with Microsoft.Office.Core ..
    /Søren

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

    Re: Refence to template (office 2003)

    WordBasic is a legacy object included for compatibility with code originally written for Word 95 or before. IntelliSense doesn't list the properties and methods of the WordBasic object, but you should still be able to use them.

    If you're interested, you can download the WordBasic help file from Word 95 WordBasic Help File.

  5. #5
    New Lounger
    Join Date
    Aug 2008
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Refence to template (office 2003)

    Thank you Hans. Now I'm on the right track. Unfortunately I'm writing in C#, and that doen't support WordBasic, but that is a subject for another group ..

Posting Permissions

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