Folder location for Addins

Hi

I am deploying an xla applications on tens of computers spread all over the 
world and am wondering how I can get automaticaly (vbs script) the default 
location for Addins...

Most of the time such a path will work
WshShell.ExpandEnvironmentStrings ("%APPDATA%"&"\Microsoft\AddIns\")

BUT I also know that on French machines the final path is not
"\Microsoft\AddIns\" but
"&"\Microsoft\Macro Complementaire\"

So is there someone who would know
 - how many different locations exist ?
 - how to find a way to automatically recover the exact location of a given 
machine
My intention being to do that through a vbs script...

Thanks to you
Kind Regrads
Alain
0
Utf
3/12/2010 7:45:01 AM
excel.programming 6508 articles. 2 followers. Follow

9 Replies
835 Views

Similar Articles

[PageSpeed] 47

have a look at UserLibraryPath Property in excel vba help.
-- 
jb


"Desaivres Alain" wrote:

> Hi
> 
> I am deploying an xla applications on tens of computers spread all over the 
> world and am wondering how I can get automaticaly (vbs script) the default 
> location for Addins...
> 
> Most of the time such a path will work
> WshShell.ExpandEnvironmentStrings ("%APPDATA%"&"\Microsoft\AddIns\")
> 
> BUT I also know that on French machines the final path is not
> "\Microsoft\AddIns\" but
> "&"\Microsoft\Macro Complementaire\"
> 
> So is there someone who would know
>  - how many different locations exist ?
>  - how to find a way to automatically recover the exact location of a given 
> machine
> My intention being to do that through a vbs script...
> 
> Thanks to you
> Kind Regrads
> Alain
0
Utf
3/12/2010 9:30:01 AM
Why would you need to know the addin location? I have deployed many addins, 
and I can't recall needing to know this.

-- 

HTH

Bob

"Desaivres Alain" <DesaivresAlain@discussions.microsoft.com> wrote in 
message news:8041C08B-B902-4996-84EB-C26C861752EC@microsoft.com...
> Hi
>
> I am deploying an xla applications on tens of computers spread all over 
> the
> world and am wondering how I can get automaticaly (vbs script) the default
> location for Addins...
>
> Most of the time such a path will work
> WshShell.ExpandEnvironmentStrings ("%APPDATA%"&"\Microsoft\AddIns\")
>
> BUT I also know that on French machines the final path is not
> "\Microsoft\AddIns\" but
> "&"\Microsoft\Macro Complementaire\"
>
> So is there someone who would know
> - how many different locations exist ?
> - how to find a way to automatically recover the exact location of a given
> machine
> My intention being to do that through a vbs script...
>
> Thanks to you
> Kind Regrads
> Alain 


0
Bob
3/12/2010 9:38:37 AM
Chip Pearson has a good description at
http://www.cpearson.com/EXCEL/installinganxla.aspx

Personally I always install Addins and associated files (help files
etc) in a user-chosen directory (default Program Files) by using an
Install script.

regards
Charles

>Hi
>
>I am deploying an xla applications on tens of computers spread all over the 
>world and am wondering how I can get automaticaly (vbs script) the default 
>location for Addins...
>
>Most of the time such a path will work
>WshShell.ExpandEnvironmentStrings ("%APPDATA%"&"\Microsoft\AddIns\")
>
>BUT I also know that on French machines the final path is not
>"\Microsoft\AddIns\" but
>"&"\Microsoft\Macro Complementaire\"
>
>So is there someone who would know
> - how many different locations exist ?
> - how to find a way to automatically recover the exact location of a given 
>machine
>My intention being to do that through a vbs script...
>
>Thanks to you
>Kind Regrads
>Alain
0
Charles
3/12/2010 10:03:54 AM
forgot to add that you may find following code useful as well.

Sub FindAddins()
With Worksheets(1)
    .Rows(1).Font.Bold = True
    .Range("a1:d1").Value = _
        Array("Name", "Full Name", "Title", "Installed")
    For i = 1 To AddIns.Count
        .Cells(i + 1, 1) = AddIns(i).Name
        .Cells(i + 1, 2) = AddIns(i).FullName
        .Cells(i + 1, 3) = AddIns(i).Title
        .Cells(i + 1, 4) = AddIns(i).Installed
    Next
    .Range("a1").CurrentRegion.Columns.AutoFit
End With

End Sub
-- 
jb


"john" wrote:

> have a look at UserLibraryPath Property in excel vba help.
> -- 
> jb
> 
> 
> "Desaivres Alain" wrote:
> 
> > Hi
> > 
> > I am deploying an xla applications on tens of computers spread all over the 
> > world and am wondering how I can get automaticaly (vbs script) the default 
> > location for Addins...
> > 
> > Most of the time such a path will work
> > WshShell.ExpandEnvironmentStrings ("%APPDATA%"&"\Microsoft\AddIns\")
> > 
> > BUT I also know that on French machines the final path is not
> > "\Microsoft\AddIns\" but
> > "&"\Microsoft\Macro Complementaire\"
> > 
> > So is there someone who would know
> >  - how many different locations exist ?
> >  - how to find a way to automatically recover the exact location of a given 
> > machine
> > My intention being to do that through a vbs script...
> > 
> > Thanks to you
> > Kind Regrads
> > Alain
0
Utf
3/12/2010 10:57:01 AM
Yes understood and can be the case I'll do it that way in a near futur...
For the moment "my" users (around 150) are used to do it themselves inside 
the "per default" location and in order not to modify all at the same time, 
my willing was while using now a vbs script for the installation to place the 
xla application at the place they are used to find it... Which mean 
....\Microsoft\Application Data\Addins\

The problem being that this location seems to be atached to the office 
native country... Having for example ...\Microsoft\Macros Complementaires for 
pure french Office...

I also have the feeling that this kind of location have desappeared with 
office 2007 but not sure...

Thanks for your contribution
Regards
Alain
0
Utf
3/12/2010 12:20:01 PM
Thanks for this input but then how to place such a command inside a script file
What to place i spite of application inside "Application.UserLibraryPath"
Sorry for this silly question but I am not yet so used with scripting...

More or less same question concerning the code you suggested in order to 
list Addins... Is it possible to run such a code into a script while Excel is 
switched off... ?

Thanks once more
Regards
Alain 
0
Utf
3/12/2010 12:37:01 PM
Hi... 

Point1 => with my script supposed to run on logon I just want to be able to 
update an xla file with a new version having the same name and this without 
disturbing the user...

Point2 => why in this specific location ? my users are already used to 
activate their addins manually through standard addins activation window, 
then my intention is not to change that point, for teh moment...

The suggestion given per john and based on the command 
Application.UserLibraryPath is rather interesting for me but I do not know 
yet know how to use such a command inside a vbscript... erhaps it's even not 
possible !

Regards
Alain

Regards
Alain

"Charles Williams" wrote:

> Chip Pearson has a good description at
> http://www.cpearson.com/EXCEL/installinganxla.aspx
> 
> Personally I always install Addins and associated files (help files
> etc) in a user-chosen directory (default Program Files) by using an
> Install script.
> 
> regards
> Charles

0
Utf
3/12/2010 1:13:10 PM
It would be

addinPath = Application.UserLibraryPath

but if the code is in the addin (why else would you have an addin), then why 
would you not use

addinPath = ThisWorkbook.Path

or even if you are accessing an adding from another addin you could use

addinPath = Workbooks("other addin.xla").Path

or

addinName = Workbooks("other addin.xla").FullName

-- 

HTH

Bob

"Desaivres Alain" <DesaivresAlain@discussions.microsoft.com> wrote in 
message news:49C0B884-D50D-46A9-8066-68000610AE46@microsoft.com...
> Hi...
>
> Point1 => with my script supposed to run on logon I just want to be able 
> to
> update an xla file with a new version having the same name and this 
> without
> disturbing the user...
>
> Point2 => why in this specific location ? my users are already used to
> activate their addins manually through standard addins activation window,
> then my intention is not to change that point, for teh moment...
>
> The suggestion given per john and based on the command
> Application.UserLibraryPath is rather interesting for me but I do not know
> yet know how to use such a command inside a vbscript... erhaps it's even 
> not
> possible !
>
> Regards
> Alain
>
> Regards
> Alain
>
> "Charles Williams" wrote:
>
>> Chip Pearson has a good description at
>> http://www.cpearson.com/EXCEL/installinganxla.aspx
>>
>> Personally I always install Addins and associated files (help files
>> etc) in a user-chosen directory (default Program Files) by using an
>> Install script.
>>
>> regards
>> Charles
> 


0
Bob
3/12/2010 1:26:45 PM
Thanks for your help
I have finaly found my way...
Here it is

On Error Resume Next
Set appXL = CreateObject("Excel.Application")
  If Err = 0 Then
    addin_folder = appXL.UserLibraryPath	
  Else
    addin_folder = _
    WshShell.ExpandEnvironmentStrings ("%APPDATA%"&"\Microsoft\AddIns\")
  End If
On Error Goto 0
Set appXL = Nothing

Regards
Alain
0
Utf
3/12/2010 6:20:03 PM
Reply:

Similar Artilces:

How do you keep favorite folders list in outlook
I have set up a folders list in outlook 2003 under mail favorite folders. Each time I re open outlook the folder list has gone and i have to start again. How do you keep list once you have created it. Alex G ...

Outlook refuses to reinitiate wants Default folders
Using WinXP Pro, IE 7.0 Beta, Office 2000 and Office 2003. Used HP iPAQ and it messed up my Outlook 2000, or was it the Outlook 2003 that did it. Since July I cannot reinstall and get it back. I have tried an uninstall of Outlook via the Control Panel > Add/Remove programs, but there is no Outlook as a separate. So then I did a do not install under Control Panel. No luck thereafter. My System Restore for the earlier date is refused. Can anyone suggest a solution? 2.) Where should I collect up the email files/folders so that I can reinitiate my accounts and the stored emails once I d...

how do I save mail folders to another aplce on my hard drive?
I save my emails according to categories and have several folders categorized for 2009. Since it is 2010 now, I want to store those 2009 mail folders on an external hard drive and remove them form my laptop, making room for new 2010 folders. How do I do that? thanks It's pretty easy. In WLM, create a storage folder for 2009. (Right-click on Storage folders and click New folder .... You will be prompted for a folder name. Name it: 2009). Move (drag) all of your 2009 category folders to your new 2009 storage folder. From your Windows Explorer, copy the 2009 folder to you...

Outlook 2000 after XP upgrade: "unable to access folders"
I just upgraded from ME to XP. All if a sudden my shortcut buttons for inbox, outbox, deleted items, and everything else results in a message: "Unable to display the folder: unable to display the folder: folder no longer exists." I am, however, able to access these folders using the toolsbars view>go to. So these folders must exist, but apparently do not appear in the place that Windows XP expects them. Can anybody offer any suggestions or advice? Thanks, Sandor J. Woren window Try starting outlok from the Run command ...

Delete Public folder
How can I delete the last public folder in a storage group? This is on a recovery server and I need to delete this store. Thanks ...

Change Contact Folder View
Hi friend! I am Jamil; I have one problem with my MS Outlook. Whenever I make new folder in my Contacts folder it shows as Address Card so I have to go on the View menu / Current View, and then I chouse Phone List (because I like this view) after that I customize columns. And I have to do this with all folders it tack too much time, because I have 20 folders in my Contact folder. So I want to know how I can do Phone List default view. I have MS Office XP And I want to ask you one think more, I have some questions about MS Windows XP so where is the best to post this questions? Than...

"Empty Deleted Items Folder upon exiting" not working
I am using Outlook for Office 2000. Outlook for Office XP was previously installed in the computer but was uninstalled. Now when I have any items in my Delete Folder with the setting "Empty Deleted Items Folder upon exiting", I get the message asking if I really want to delete but the items in the folder are only sometimes deleted. Any ideas about why this intermittant failure to delete might be occuring? Robert Anastasio wrote: > I am using Outlook for Office 2000. Outlook for Office XP was > previously installed in the computer but was uninstalled. Now when I > h...

deleting email folder
How does one delete an email folder which the user originally created? Right-clicking on such folders doesn't bring up any option for deleting... Thanks! Kevin What version of Outlook and does pressing the delete button help? Are these subfolders or default folders in a new personal folders store? --� Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion intact. Due to the (insert latest virus name here) virus, all mail sent to my personal account will be deleted without reading. After furious head scratching, KB asked: | How does one delete an emai...

Restore a public folder #2
I need to restore a Public Folder from a backup without a brick level backup. Environment - 3 Exchange Svrs all 2K3 SP2 all within the same site with Public Folder site replication enabled between all 3 Exchsrvrs. Does this sound like a safe & successful plan.? 1 - Do a backup to clear the transaction logs 2 - Stop the IS and backup all 3 Exchsrvr's MDBData folders. 3 - Start the IS 4 - PST each servers Public Folders 5 - dismount the pub to be restored and stop the IS on the other Exchsrvrs 6 - Restore a public store from backup tape 7 - PST the folder to be restored...

sharing folder problems
Hi: I'm having problems with outlook 2003/Exchange 2000 i've shared a folder in mi boss outlook and when i tryed to open it in my outlook ti says that can't connect to the user or folder. i've already give the ALL permission to my user but still can't open it from another PC. Someone can help me please!!!! it's my boss petition so i'm in troubles!!!!!! THANKS Sebastian Maceda ...

Folder List Slow to Open
On one of our computers, when Outlook 2000 is started, the Folder List is slow to open. The PST file is about 400 MB. The OS is Windows 2000 SP4. Does anyone know why it is slow? It has a lot of folders in it, but it does not have any more than several other computers that are not experiencing the same slowness. ...

Moving files from inbox to personal folder
WHEN TRYING TO MOVE FILES FROM INBOX TO PERSONAL FOLDERS USER GETS AN ERROR AND THE ACTION DOES NOT COMPLETE. ALL SETTING APPEAR TO BE CORRECT AND THERE IS ALSO NO VISIBLE SECURITY ISSUE. Error Messages: ITEM COULD NOT BE MOVED. IT HAS EITHER ALREADY BEEN MOVED OR ACCESS HAS BEEN DENIED. Don't use CAPS!!! Clear the Deleted Items folder and try again. Otherwise post more info like version of Outlook. -- Robert Sparnaaij [MVP-Outlook] www.howto-outlook.com Tips of the month: -Backup and Restore -Create an Office XP CD slipstreamed with Service Pack 3 ----- "Troy" <...

How can I look in a sharing folder of another computer?
I have a home network of 4 computers - 2 WinXP, Vista, Win7. The network works normally. I can easily look in a sharing folder of another computer by my Total Commander. But I made a bootable BartPE CD. After booting from the CD I can get online and browse any sites around the world, but I cannot look in a nearby computer folder! Every time I get the following message. "Workgroup is not accessible. You might not have permission to use... " How do I fix this problem? Thank you Lev "Levlg" <levlg@tpg.com.au> wrote in message news:4ba0b9b4$1@d...

List all folders and files 02-23-10
Good afternoon everybody, I have a memory stick with numerous folders and files. What I would like to do is list in a spreadsheet all the folders and files within those folders please. Thanks in advance, Paul I have an add-in that will do exactly that, and more. See http://www.cpearson.com/excel/FolderTree.aspx for details. If you to just have code, the following code will create a list. Copy this code, then in VBA go to the Tools menu, choose References, and scroll down to and check "Microsoft Scripting Runtime". Change the lines of code marked with <<< to ...

any method for creating folders on the fly?
I own a domain, and I sign up at individual sites using that domain@mydomain.com- so I can see who sells me down the river. my host sends these all to me at a different address- they still come as though addressed to the address I put in. the regular ones, most of these I have setup to go into their own folders.-- but I make new ones EVERY day. I'd like to create a rule (and I realize stock outlook can't do this) that says "move all emails sent to anyaddress@mydomain.com to folder anyaddress" and "create that folder if it does not exist." anyone? am I i...

Apply Outlook rules to other folders...
Is there any way to apply the rules to a folder other than "inbox"? When I try to change the "apply rules to this folder" setting, the only folder choice I have is the IMAP inbox. Thanks, P ...

How do I transfer OLEXP folders?
I have to computers, one which I just had to format because of endless problems. Now I want to get my Outlook Express set back up, is there any way I can transfer folders and messages from one Outlook Express 6 to another Outlook Express 6 on a network? I tried the Export option and got this messages "An error occurred while initalizing MAPI. Any help??? "Kevin" <carrottop_15@hotmail.com> wrote in message news:ac7b01c43693$89a28b40$a101280a@phx.gbl... > I have to computers, one which I just had to format > because of endless problems. Now I want to get my Ou...

Send and save a message in folders
Is it possible to send and save a message in a folder like it is with Lotus Notes? A simple function asking in which folder I would to save my send mail. I would like to save all messages to one adress in one folder. Anders, As far as i know Exchange doesn't have a function like that. In outlook you can creat a rule that stores sent messages to specific custom made folders in Outlook Rgds, Jelle There's no setting to ask on sending but you can have rules move sent messages based on criteria "anders bitzer" <andersbitzer@discussions.microsoft.com> wrote in messa...

Lost contacts, folders and messages after repair
I am running Outlook 2002 SP 2 on a fairly new Dell. I was experiencing problems, so I ran the "Reapir" function from the Microsoft Office installation disk. The repair fixed the functionality of the program, but erased all my e-mail messages, folders, address book and settings. I was able to restore the settings and can access new email, but all my old data is lost. How can I restore my old address book, folders and saved email? Check the properties of yr current Personal Folder, to checks its name & location. Then Search, to include hidden files, for *.pst If this f...

Synchronizing Off-Line Folders
We use Exchange 2000. I use off-line folders for everything. It appears that I should be able to synchronize some of those - like my calendar - so that others on the Exchange system can see it. Is this possible? I think I have calendar selected for off-line synchronization, but I'm not sure where I did that. Synchronizing your offline folders makes them available to you when you are not connected to Exchange. It has nothing to do with whether other users can see your calendar. If you want to have others be able to see your calendar, you need to set permissions. --� Milly St...

automatically deleting messages in the SPAM folder
In the Outlook Express 6 I am using, there are two separate folders named 1) Deleted items and 2) SpamMails. The messages in the Deleted messages get automatically deleted when O E 6 is closed. But the messages in the Spam Folder (even if deleted) are moved by O E 6 into the Deleted items Folder and since I want to see them removed from the system, I have to delete them, once again. Is there any way, O E 6 can be asked to automatically delete all the messages in the Spam folder? O E 6 also asks me every time it is closed if I want to compact all messages to save space bla bla,...

Public Folders on 2 Exchange Servers #2
I have 2 Exchange Servers (2003 Ent. Ed.) in seperate Orgs - that each are running Public Folder stores. (keeping in mind we only have 1 "Public Folders", just multiple stores) They are in sync and I've tried to dismount the store on Server A so that everyone will only use Server B for their Public Folder needs. Once I dismount the store on Server A , everyone that has their mailboxes on Server A cannot see what's in the Public Folders on Server B. How can I dismount the Public Folders stores on Server A and have those people with mailboxes on Server A read/access th...

Extracting e-mail addresses from a public folder
I'm using Exchange 2003 server. I have some public folders that have multiple e-mail addresses assigned to them. I would like to know how to extract all the e-mail addresses assigned to a public folder for all the public folders and save them to a file. Start with: csvde -f c:\output.csv -r (objectClass=publicfolder) -l proxyAddresses Run this from the server. You can then put this into Excel, etc, and massage as required. -- Neil Hobson Exchange MVP For Exchange news, links and tips, check: http://www.msexchangeblog.com "Lex Nesta" <lnes@haestad.com> wrote in...

Reminders Fail on Messages Sorted to Favorite Folder -- HELP
I've got favorite folders and rules created so incoming and outgoing mail sorts itself into folders to help me keep track. However, I've found that any incoming message in one of these folders for which I set up an alert/reminder -- will fail to notify me with a reminder. Alerts set on messages in the inbox work no problem -- it's only the alert failure on messages sorted to a specific box that fail. Any help with this GREATLY appreciated! Paul <lindy_ngo_spam_corp@bellsouth.net> wrote: > I've got favorite folders and rules created so incoming and outgoing &...

How to open another user's folder list?
Hello, I have Outlook 2002 SP3 and Windows XP SP2. In my Folder List I have my mailbox expanded showing all my folders (inbox, calendar, contacts, etc.). I also have the mailbox for our general company email account (info@) that receives the emails submitted from our website. But when I click on the + sign next to it to expand it, I get a message saying "Unable to expand the folder. The set of folders could not be opened. The operation failed." This company email is set up as it's own user on our network, and I am set as it's delegate with full control over all it's ...