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

    Re: Macro for Odd/Even Pages (2000)

    Leanne,

    Try this:
    <pre> Dim DocRange As Range
    Dim PageCt As Long

    Set DocRange = ActiveDocument.Range
    PageCt = DocRange.Information(wdActiveEndPageNumber)

    Application.Run MacroName:="DraftLogo"
    If PageCt > 1 Then
    Selection.GoToNext wdGoToPage
    Application.Run MacroName:="DraftLogo"
    ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument
    Selection.HomeKey Unit:=wdStory
    With AutoCorrect
    .CorrectInitialCaps = True
    .CorrectSentenceCaps = True
    .CorrectDays = True
    .CorrectCapsLock = True
    .ReplaceText = True
    .ReplaceTextFromSpellingChecker = True
    .CorrectKeyboardSetting = False
    End With
    With Options
    .AutoFormatAsYouTypeReplaceQuotes = True
    .AutoFormatAsYouTypeReplaceOrdinals = False
    .AutoFormatAsYouTypeReplaceFractions = False
    End With
    With Options
    .AutoFormatReplaceQuotes = True
    .AutoFormatReplaceSymbols = False
    .AutoFormatReplaceOrdinals = False
    End With
    End If

    ActiveDocument.Protect Password:="", NoReset:=False, Type:= _
    wdAllowOnlyRevisions

    Set DocRange = Nothing
    </pre>

    Gary

  2. #2
    2 Star Lounger
    Join Date
    Jul 2001
    Location
    Wisconsin, USA
    Posts
    193
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Macro for Odd/Even Pages (2000)

    Thanks Gary, I'll try it out.

    On another note, if I have a document and I protect it for track changes, a user makes changes and saves document, then gives to me for review/finalization, when I run the above macro, I want the tracked changes to show up on the screen until I accept/reject them; however, anything that I add, delete, copy, etc. should not be shown on the screen as changes. Is this possible?

  3. #3
    2 Star Lounger
    Join Date
    Jul 2001
    Location
    Wisconsin, USA
    Posts
    193
    Thanks
    0
    Thanked 1 Time in 1 Post

    Macro for Odd/Even Pages (2000)

    <P ID="edit" class=small>(Edited by jscher2000 on 30-Apr-04 13:08. )</P>Edited: <!t>[pre]<!/t> and <!t>[/pre]<!/t> tags added around the code block to preserve indenting. -Mod.

    I have the following macro which runs a draft logo on a document set for odd/even pages. If the document is only 1 page, the macro stops because there isn't a second page, therefore not finishing the macro which is to protect the document for track changes. Is there other code that can be used that if there is not a second page that the macro will continue to run?

    <pre> Application.Run MacroName:="DraftLogo"
    Selection.GoToNext wdGoToPage
    Application.Run MacroName:="DraftLogo"
    ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument
    Selection.HomeKey Unit:=wdStory
    With AutoCorrect
    .CorrectInitialCaps = True
    .CorrectSentenceCaps = True
    .CorrectDays = True
    .CorrectCapsLock = True
    .ReplaceText = True
    .ReplaceTextFromSpellingChecker = True
    .CorrectKeyboardSetting = False
    End With
    With Options
    .AutoFormatAsYouTypeReplaceQuotes = True
    .AutoFormatAsYouTypeReplaceOrdinals = False
    .AutoFormatAsYouTypeReplaceFractions = False
    End With
    With Options
    .AutoFormatReplaceQuotes = True
    .AutoFormatReplaceSymbols = False
    .AutoFormatReplaceOrdinals = False
    End With
    ActiveDocument.Protect Password:="", NoReset:=False, Type:= _
    wdAllowOnlyRevisions</pre>

    Thanks,

  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: Macro for Odd/Even Pages (2000)

    The default behavior of Word is: as soon as you turn off tracking, your new changes are not tracked. As long as you continue to display changes, the existing changes will remain marked on the screen. I think this is what you want.

    I'm not sure, without trying your code on an actual document, whether it interferes in any way with Word's default behavior.

  5. #5
    2 Star Lounger
    Join Date
    Jul 2001
    Location
    Wisconsin, USA
    Posts
    193
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Macro for Odd/Even Pages (2000)

    I'm understanding you to say that track changes cannot be turned off via macro - is that correct? When you say existing changes, are you referring to changes to the document before track changes were turned off?

  6. #6
    2 Star Lounger
    Join Date
    Jul 2001
    Location
    Wisconsin, USA
    Posts
    193
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Macro for Odd/Even Pages (2000)

    What I did in the attached document is: Deleted all of 1.01 B. 1. (ok so far), copied all of 1.01 B. 5 and pasted it after 1.04 B. 4. (ok so far), then when I delete all of 1.02 A. 1., the auto numbering shows as though changes are being tracked or if I copy all of 1.02 A. 1. and paste it after 1.04 B. 5., it also looks as though the changes are being tracked.

    It seems as though Word is just tracking certain things but there is reasoning behind it.
    Attached Files Attached Files

  7. #7
    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: Macro for Odd/Even Pages (2000)

    Sorry, been away for the past week.

    No, I don't mean that you can't turn tracking on and off with a macro; you can. All I meant was that you should continue to see the already marked changes until accepted or rejected, even after you stop tracking new changes.

    I didn't open the document (late at night here), but I'll admit that auto-numbering can be funky under the best of circumstances, and I have very little experience with how it is supposed to behave in your scenario. Hopefully someone else who uses it more can take a look.

Posting Permissions

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