Results 1 to 7 of 7
  1. #1
    Star Lounger
    Join Date
    Jan 2001
    Posts
    51
    Thanks
    0
    Thanked 0 Times in 0 Posts

    registering .dll with VBA

    Is it possible to run regsvr32.exe within Word VBA in .dot file to register a .dll using Word 97 SR2/WinNT? What code could I use to invoke it?

    I am using a .dll in a form that a few users have not had registered on their workstations. Ideas are appreciated. Thanks.

  2. #2
    2 Star Lounger
    Join Date
    Feb 2001
    Posts
    141
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: registering .dll with VBA

    Do the users even have the DLL on their PC's? You might want to think about using the Package And Deployment Wizard that comes with Office Developer. I believe it will install and register the necessary DLL's you use in your VBA project(s).

  3. #3
    Star Lounger
    Join Date
    Jan 2001
    Posts
    51
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: registering .dll with VBA

    Thanks for responding. They do have the .dll. It isn't self-registering and I'm looking for a way to register it as part of the initialization of my template, if possible.

  4. #4
    Star Lounger
    Join Date
    Jan 2001
    Posts
    51
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: registering .dll with VBA

    I am testing using the shell command in VBA to run a batch file to check if a .dll is on the workstation, copy it down if it isn't, and register it (I don't have Developer addition). It seems to work so far. Any dangers I might be overlooking? Thanks!

  5. #5
    2 Star Lounger
    Join Date
    Feb 2001
    Posts
    141
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: registering .dll with VBA

    I cringe when resorting to using SHELL. Since it runs asynchronously, it can get tricky attempting to figure out if whatever you shelled out to do actually worked or not. There's gotta be a better way than shelling out. Perhaps someone else in this forum has a better idea.

  6. #6
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: registering .dll with VBA

    Lookup the FileSystemObject in help. You can use it to do a search for the file and even iterate through folders. Also lookup FileCopy. Both of those run from VBA. You're on your own with regsvr32.
    Charlotte

  7. #7
    Star Lounger
    Join Date
    Jan 2001
    Posts
    51
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: registering .dll with VBA

    Thank you. I did give up using Shell because it was just too scary. Worked but felt totally out of control. I obviously need to research this further for the future, but for now I found only one user who needed the .dll registered and used regsrv32.exe at the workstation to take care of it. Thanks again. These forums are invaluable.

Posting Permissions

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