WORD/VBA EXPERIENCES

DATE: 12/02/96 11:55 PM
I've completed a first cut conversion of Enveloper to Word97. I'd like to submit a summary of what I can remember it involving. These notes are not very well organized at the moment, but hopefully they'll be useful! Some of the information contained there came out of discussions with Steven Mitchell (Smith), Lee Hudspeth, and many others.

GENERAL IMPRESSIONS

SPECIFIC HINTS

  • On the other hand, this makes many APIs EASIER to use! Because there's a concept of ByRef, we no longer have to play games with GlobalAlloc just to get values back from API functions. For instance, the implementation of RegLib has been simplified greatly by this.
  • Smitch points out one possible issue, "Declares are module level objects. Since module level variables are global in scope a DLL will stay loaded until the template is removed from memory or the project is Reset." He also suggests a possible workaround:
  • "If you need a DLL to unload try wrapping it in a class module. When the class module is set to nothing it should unload all associated objects (including the DLL). I haven't done this, but in theory it should work."
  • Find
    Replace
    " +
    " &
    + "
    & "
    $ +
    $ &

    SPECIFIC ISSUES

    WordBasic.Call "Hello"
    Application.Run "Hello"
    ActiveDocument.Module1.Hello
    ActiveDocument.ThisDocument.Hello*
    ActiveDocument.Hello.MAIN
    ActiveDocument.Module1.Hello
    AttachedTemplate.ThisDocument.Hello
    AttachedTemplate.ThisDocument.Hello
    ActiveDocument.ThisDocument.Hello
    AttachedTemplate.Module1.Hello
    AttachedTemplate.Module1.Hello
    Normal.ThisDocument.Hello
    AttachedTemplate.Hello.MAIN
    Normal.Module1.Hello
    Normal.ThisDocument.Hello
    Addin.ThisDocument.Hello
    Normal.Module1.Hello
    Addin.Module1.Hello
    Normal.Hello.MAIN
    ActiveDocument.Hello.MAIN
    Addin.ThisDocument.Hello
    AttachedTemplate.Hello.MAIN
    Addin.Module1.Hello
    Normal.Hello.MAIN
    Addin.Hello.MAIN
    Addin.Hello.MAIN

    This file is also available for download as a zipped Word95 document.

    Migrating to Office97


    FrontPage
    Woody Leonhard