Results 1 to 8 of 8
  1. #1
    3 Star Lounger
    Join Date
    May 2002
    Location
    Smithfield, Free State, South Africa
    Posts
    210
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Markup (Word 2003)

    How do I deactivate the View > Markup option?
    I recorded the steps and got: WordBasic.ViewChanges
    However, if the Markup is not selected, it selects it - not what I want.
    What I want is for it to check if it is selected, if it is, to turn it off, otherwise leave it off.
    Please help
    Regars

  2. #2
    Gold Lounger
    Join Date
    Feb 2004
    Location
    Cape Town, RSA
    Posts
    3,444
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Markup (Word 2003)

    You can modify the code you recorded to:
    <pre> If WordBasic.ViewChanges = True Then
    WordBasic.ViewChanges = False
    End If
    </pre>

    This code you will need to put into the Document_Open and Document_New events of your Normal template.
    Choose Tools Macros Visual Basic Editor, double click on Normal in the Projects window, double click on Microsoft Word Objects, ThisDocument. In the module that opens, click on the Object Dropdown and choose Document, and click on the Procedure dropdown and select New and Open.
    Paste the code into each sub procedure.
    When you open a new document, it should switch off the Markup option!
    Regards,
    Rudi

  3. #3
    3 Star Lounger
    Join Date
    May 2002
    Location
    Smithfield, Free State, South Africa
    Posts
    210
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Markup (Word 2003)

    Thanks Rudi

  4. #4
    3 Star Lounger
    Join Date
    May 2002
    Location
    Smithfield, Free State, South Africa
    Posts
    210
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Markup (Word 2003)

    I get "compile error in hidden file" error when I try to open the template I created.
    (I added the code to the Normal template as you said - no error there that I can see)
    Any ideas?

  5. #5
    Gold Lounger
    Join Date
    Feb 2004
    Location
    Cape Town, RSA
    Posts
    3,444
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Markup (Word 2003)

    If you are dealing with a template other than the normal template, then the code I supplied must be copied into the Open event of that template.
    Open your template. (Make sure it is your template, and not a copy). Once in your template go back to Tools Macro Visual Basic Editor. Follow the steps of my previous post and ensure you paste the code into your templates Open and New event. It should correct the problem.
    Regards,
    Rudi

  6. #6
    3 Star Lounger
    Join Date
    May 2002
    Location
    Smithfield, Free State, South Africa
    Posts
    210
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Markup (Word 2003)

    I get an if block error.
    Have removed the if statements and it appears to work.
    Regards

  7. #7
    Gold Lounger
    Join Date
    Feb 2004
    Location
    Cape Town, RSA
    Posts
    3,444
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Markup (Word 2003)

    The if block error occurs when you start a if structure and forget to add the end if statement.

    If it is working though...I'm glad.

    Cheers
    Regards,
    Rudi

  8. #8
    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: Markup (Word 2003)

    When you paste "preformatted" code from the Lounge, it may wrap onto one line, which is guaranteed to cause errors. If you paste into a blank Word document first, the manual line breaks will be properly interpreted (Word is smarter than the VB Editor) and you then can paste from Word into the VB Editor. This should cure that kind of error.

Posting Permissions

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