Results 1 to 3 of 3
  1. #1
    New Lounger
    Join Date
    May 2003
    Location
    Melbourne, Victoria, Australia
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Creating a DLL from a Template Project (Word XP(VBA))

    Is it possible to convert a template project file that contains modules, userforms into a DLL?

  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: Creating a DLL from a Template Project (Word XP(VBA))

    Yes, mostly. If you have Visual Studio, you can create a stand-alone DLL, or if you have Office Developer Edition you can create a COM Add-in. Code modules and userforms should mostly carry over, but there usually are a number of changes required to make the code more free-standing.

  3. #3
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Creating a DLL from a Template Project (Word

    > convert a template project file that contains modules, userforms into a DLL?

    I did this a year or two ago, but dropped the idea and reverted to DOTs.

    Specifically I have a Utils.DOT, a library of 400+ common and useful utility functions, and several applications, such as Indexer, which embraces functions for extracting "Interesting Words". I thought to convert such common toolbox DOTs to DLL to (1) speed up execution (2) reduce space (3) hide code etc etc etc.

    My problems centered on having to re-register DLLs when they changed.

    A new application DOT, using an DLL, worked fine until I upgraded the DLL, at which time I had to re-enter the new appliaction DOT and re-attach the DLL. That would not be an option to a user, since the application DOT would normally be locked, and so the user would not be able to open the application DOT in VBA to mess around with Tools, References.

    I really wanted it to work, because I have based many of my document application DOTs on re-useable tools within the application.

    I'd be interested to hear how you fare.

    I guess I spent about four man-weeks in total, struggling to make use of DOT-->DLL; some of that time was spent negotiating the references (as above), some spent tidying the DOT prior to conversion. When the old posts come back you can search (grin!) for my reports.

Posting Permissions

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