Results 1 to 4 of 4
  1. #1
    New Lounger
    Join Date
    Dec 2006
    Location
    Alberta
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Word macros (Word 2003)

    A macro that worked well in Word 97 is now completely ignored in this version.

    The macro finds a specific bookmark and then moves the cursor to that position on opening or on creating a new document based on the template. What do I need to change?

    Private Sub Document_New()
    '
    ' BioStart Macro
    '
    Selection.GoTo What:=wdGoToBookmark, Name:="BioStart"
    With ActiveDocument.Bookmarks
    .DefaultSorting = wdSortByName
    .ShowHidden = False
    End With
    End Sub

    Private Sub Document_Open()
    '
    ' BioStart Macro

    Selection.GoTo What:=wdGoToBookmark, Name:="BioStart"
    With ActiveDocument.Bookmarks
    .DefaultSorting = wdSortByName
    .ShowHidden = False
    End With
    End Sub


    Thanks

  2. #2
    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: Word macros (Word 2003)

    Could it be macro security settings?

    Are you launching the document from a web page rather than a normal disk drive?

  3. #3
    New Lounger
    Join Date
    Dec 2006
    Location
    Alberta
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Word macros (Word 2003)

    Although macro setting is set to high, I've set myself up as a trusted publisher.

    Not working from a web page.

    Anything else?

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

    Re: Word macros (Word 2003)

    Try setting macro security to Medium temporarily to see if it works then. I don't see anything wrong with the code per se.

    (The code *must* be in ThisDocument, it will *not* work from a standard module)

Posting Permissions

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