|
-
Sep 4th, 2005, 04:37 PM
#1
Installing VBA files
Evening all,
My app uses templates programmed in VBA to add stuff to Office. I also have a VB.Net controller, which in addition is the main install package. My problem comes in that I need to put the templates in each user's Office Startup folder (I've tried the All Users startup folder - doesn't work), most of whom are not administrators, but they'll all need to be uninstalled should the administrator wish to do so .
My current MO is the following:
1) Templates copied to c:\Program Files\MyApp folder during install.
2) When each user runs the main app, it checks to see if the files are in the Office\Startup folder. If not, copy them across.
3) Add a file to the Common Files\MyApp folder (only location where all users can write) specifying file location (in case it is not always the same) of template.
4) During Uninstall by admin, this Common Files\MyApp folder is checked, all users who have run the app are identified and the paths for the templates established, so that they can be deleted.
5) Then take the admin to Add/Remove programs to uninstall the rest of it.
This is a bit clunky, although it seems to work fine. The question is, is there an easier way, so that the templates can just be incorporated into the main install and likewise removed. I don't know a way of specifying the "Office\Startup" folder in a VB.Net setup project.
Cheers
zaza
-
Sep 4th, 2005, 11:07 PM
#2
Lively Member
Re: Installing VBA files
If you can create an instance of Excel and access it's application properties that way:
VB Code:
Dim objExcelApp As Object
Set objExcelApp = CreateObject("Excel.Application")
With objExcelApp
.Visible = True
MsgBox .StartupPath
End With
Set objExcelApp = Nothing
Just set the visible to False or cut it out, or I am sure you can probably come up with some way if you have already done all you have stated in your post.
-
Sep 5th, 2005, 12:41 PM
#3
Re: Installing VBA files
Thanks, but I think you may have the wrong end of the stick. I can already identify the startup folders for the various users and put the templates in there - at the moment I do this when each user runs the app for the first time and store a log of the users. What I'd like to do is put the templates in the startup folders at install, so that the uninstall process takes care of getting rid of them and I don't have to do the more complicated uninstall process that I'm doing at the moment.
Cheers
zaza
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|