Results 1 to 5 of 5
  1. #1
    3 Star Lounger
    Join Date
    Feb 2001
    Location
    Portland, Maine, USA
    Posts
    296
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Error calling procedure (Word 2002/SP2)

    I have an AutoNew macro running in my Word template. Near the end of the macro I am calling another procedure stored in a global template. The line of code is: Application.Run "RemoveCustomProps"
    When it hits this line, I get this error.
    Title bar: Microsoft Visual C++ Runtime Library.
    Error message: Runtime Error! Program ...winword.exe. Abnormal program termination.

    It is declared as a Public Sub. If I run RemoveCustomProps it runs fine.

    Any thoughts/ideas?

  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: Error calling procedure (Word 2002/SP2)

    If you open the global template (File>Open...), add a Stop statement to the RemoveCustomProps procedure, and then (without closing the global template) try calling it from your other procedure, how far can you get stepping through it?

  3. #3
    3 Star Lounger
    Join Date
    Feb 2001
    Location
    Portland, Maine, USA
    Posts
    296
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Error calling procedure (Word 2002/SP2)

    That is what I was going. As soon as I hit the line calling the procedure, I get the error.

  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: Error calling procedure (Word 2002/SP2)

    Can you call any other procedures in that global template successfully? Maybe export the code and import into a new template.

  5. #5
    Super Moderator
    Join Date
    Dec 2000
    Location
    New York, NY
    Posts
    2,970
    Thanks
    3
    Thanked 29 Times in 27 Posts

    Re: Error calling procedure (Word 2002/SP2)

    Darryl,

    Not sure what is causing that, and not sure whether the following will help, but in additional to trying Jefferson's suggestions, see <post#=255154>post 255154</post#> for a method for calling procedures in global templates, that does not require the use of Application.Run - not sure if it will help, but something else to try.

    Gary

Posting Permissions

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