• Word macros (Word 2003)

    Author
    Topic
    #439815

    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

    Viewing 0 reply threads
    Author
    Replies
    • #1051844

      Could it be macro security settings?

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

      • #1051852

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

        Not working from a web page.

        Anything else?

        • #1051870

          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)

    Viewing 0 reply threads
    Reply To: Word macros (Word 2003)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: