Installation of VBA modules

A

Arlan

Can someone please point me to an article or two, or give me pointers on the
best practices to install VBA code into a users machine. This should be a
close as possible to a shrink-wrap type installation where a competent
technical person is not involved.

THANKS!
 
J

Jezebel

The principle is easy: the modules should be in an add-in, saved in Word's
start-up folder.

The tricky part is getting it there. If you really want shrink-wrap
installation you use an installer application -- eg InstallShield, the VB
Package and Deployment wizard, or one of the freebies. This method also has
the advantage that your add-in is listed in the Control Panel 'Add/Remove
Programs' and can be uninstalled.

The main task in installation is to find the start-up folder. There are two
possibilities: the start-up folder reported by Word itself -- somewhere
under Documents and Settings\[User name]\Application data, which will make
the add-in specific to the user who installs it; or under the Office progam
folder, by default C:\Program Files\Microsoft Office\OFFICE11\STARTUP, which
makes the add-in available to all users, but requires re-installation if
they upgrade their version of Office.
 
H

Howard Kaikow

Jezebel said:
The principle is easy: the modules should be in an add-in, saved in Word's
start-up folder.

The tricky part is getting it there. If you really want shrink-wrap
installation you use an installer application -- eg InstallShield, the VB
Package and Deployment wizard, or one of the freebies. This method also has
the advantage that your add-in is listed in the Control Panel 'Add/Remove
Programs' and can be uninstalled.

The main task in installation is to find the start-up folder. There are two
possibilities: the start-up folder reported by Word itself -- somewhere
under Documents and Settings\[User name]\Application data, which will make
the add-in specific to the user who installs it; or under the Office progam
folder, by default C:\Program Files\Microsoft Office\OFFICE11\STARTUP, which
makes the add-in available to all users, but requires re-installation if
they upgrade their version of Office.

I roll my own installation program to install templates.

And I would NEVER clutter Add/Remove programs for the mere install of a Word
template.
 
J

Jezebel

For a straight template, no. But if it's an add-in with real functionality
the user may will consider it an application, in which case it should behave
in the same way as other applications. Also, if the add-in adds toolbars to
Word, without an Add/Remove option the you'll get support calls from people
wanting to know how to get rid of the toolbar when they don't need it any
more...



Howard Kaikow said:
Jezebel said:
The principle is easy: the modules should be in an add-in, saved in
Word's
start-up folder.

The tricky part is getting it there. If you really want shrink-wrap
installation you use an installer application -- eg InstallShield, the VB
Package and Deployment wizard, or one of the freebies. This method also has
the advantage that your add-in is listed in the Control Panel 'Add/Remove
Programs' and can be uninstalled.

The main task in installation is to find the start-up folder. There are two
possibilities: the start-up folder reported by Word itself -- somewhere
under Documents and Settings\[User name]\Application data, which will
make
the add-in specific to the user who installs it; or under the Office progam
folder, by default C:\Program Files\Microsoft Office\OFFICE11\STARTUP, which
makes the add-in available to all users, but requires re-installation if
they upgrade their version of Office.

I roll my own installation program to install templates.

And I would NEVER clutter Add/Remove programs for the mere install of a
Word
template.
 
H

Howard Kaikow

Jezebel said:
For a straight template, no. But if it's an add-in with real functionality
the user may will consider it an application, in which case it should behave
in the same way as other applications. Also, if the add-in adds toolbars to
Word, without an Add/Remove option the you'll get support calls from people
wanting to know how to get rid of the toolbar when they don't need it any
more...

In those cases, I add an uninstall to the setup program and/or menus.
 
J

Jezebel

You seem to have a penchant for re-inventing wheels. Windows provides an
entirely servicable, and well-understood, procedure for install and
uininstall, that works well and requires minimal effort on the developer's
part. What you're recommending is a great deal more effort, for a worse
result.
 
J

Jezebel

On further reflection, I'm puzzled by your suggestion. You can't run code in
an add-in to remove itself: you can't delete the add-in while code within it
is running, because -- obviously -- the file is open and therefore locked in
the file system. How do you do it?
 
B

Ben M

Mark,

The Add/Remove programs is the most logical place to do this. You must
remember we have advanced from Windows 3.11.

Last time I checked my installation list, it was quite big due to Windows
Hot Fixes, so this area would not be particulary clean anyway.

Regards, Ben

Howard Kaikow said:
Jezebel said:
The principle is easy: the modules should be in an add-in, saved in Word's
start-up folder.

The tricky part is getting it there. If you really want shrink-wrap
installation you use an installer application -- eg InstallShield, the VB
Package and Deployment wizard, or one of the freebies. This method also has
the advantage that your add-in is listed in the Control Panel 'Add/Remove
Programs' and can be uninstalled.

The main task in installation is to find the start-up folder. There are two
possibilities: the start-up folder reported by Word itself -- somewhere
under Documents and Settings\[User name]\Application data, which will make
the add-in specific to the user who installs it; or under the Office progam
folder, by default C:\Program Files\Microsoft Office\OFFICE11\STARTUP, which
makes the add-in available to all users, but requires re-installation if
they upgrade their version of Office.

I roll my own installation program to install templates.

And I would NEVER clutter Add/Remove programs for the mere install of a Word
template.
 
H

Howard Kaikow

Jezebel said:
On further reflection, I'm puzzled by your suggestion. You can't run code in
an add-in to remove itself: you can't delete the add-in while code within it
is running, because -- obviously -- the file is open and therefore locked in
the file system. How do you do it?

You can unload the add-in.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top