Discussion:
Making addin available to others
(too old to reply)
zSplash
2006-10-17 22:10:44 UTC
Permalink
I have put an addin in the username's "C:\Documents and Settings\" & uname &
"\Application Data\Microsoft\Addins" folder, and the necessary templates in
the username's "C:\Documents and Settings\" & uname & "\Application
Data\Microsoft\Templates" folder.

The trouble is, I want to make a desktop shortcut to Word with a startup
switch pointing to a template in any user's Templates folder. I can do it
with myName (by making the shortcut, and copying it to my desktop
programmatically). But, how can I programmatically make a shortcut (with
the template startup switch) for any user?

I hope the question is clear.

TIA
Russ
2006-10-18 07:55:01 UTC
Permalink
You might experiment with Windows Environmental Variables that work in the
Windows Explorer (not I.E.,the browser) and should work in shortcuts.
Google search came up with this site:
http://kennethhunt.com/archives/000933.html
Post by zSplash
I have put an addin in the username's "C:\Documents and Settings\" & uname &
"\Application Data\Microsoft\Addins" folder, and the necessary templates in
the username's "C:\Documents and Settings\" & uname & "\Application
Data\Microsoft\Templates" folder.
The trouble is, I want to make a desktop shortcut to Word with a startup
switch pointing to a template in any user's Templates folder. I can do it
with myName (by making the shortcut, and copying it to my desktop
programmatically). But, how can I programmatically make a shortcut (with
the template startup switch) for any user?
I hope the question is clear.
TIA
--
Russ

drsmN0SPAMikleAThotmailD0Tcom.INVALID
Russ
2006-10-18 16:00:07 UTC
Permalink
Zsplash,
Here is one way I have used Windows Environmental Variables in VBA code in a
WinWord 97 machine at work.
I use the code below to find out who the user is and where the My Documents
folder is on a Windows machine. Then it preps the file save dialog with a
suggested file name and folder location.


Dim strDrive as String
Dim strPathDocs as String
Dim strPathTemp as String
Dim strPathMacroDocs as String
Dim objDialog as Word.Object


'Environmental variables standard to a Windows machine.
strDrive = Environ("HOMEDRIVE") 'harddrive letter the system is running on.

strPathDocs = strDrive & Environ("HOMEPATH") & "\My Documents"'current
user's place.

'current user's temp directory, if needed, to temporarily save files.
strPathTemp = Environ("TEMP")


'create a place for my macro project files, if they need to be saved.
If Dir(strPathDocs & "\Project Macro Documents", vbDirectory) <> "Project
Macro Documents" Then

MkDir (strPathDocs & "\Project Macro Documents")

End If


'make default file-save directory show as my project directory, if user
needs to save file.
strPathMacroDocs = strPathDocs & "\Project Macro Documents"

ChangeFileOpenDirectory strPathMacroDocs

'make default file-save name be what I suggest, if user needs to save file.

'the 1 at the end of file-save name causes the file-save name number suffix
'to increment automatically
'if there are similarly named files already in the suggested file-save
directory.
Set objDialog = Dialogs(wdDialogFileSummaryInfo)

With objDialog

.Title = "Macro_File_Results_Name 1"

.Execute

End With
Post by Russ
You might experiment with Windows Environmental Variables that work in the
Windows Explorer (not I.E.,the browser) and should work in shortcuts.
http://kennethhunt.com/archives/000933.html
Post by zSplash
I have put an addin in the username's "C:\Documents and Settings\" & uname &
"\Application Data\Microsoft\Addins" folder, and the necessary templates in
the username's "C:\Documents and Settings\" & uname & "\Application
Data\Microsoft\Templates" folder.
The trouble is, I want to make a desktop shortcut to Word with a startup
switch pointing to a template in any user's Templates folder. I can do it
with myName (by making the shortcut, and copying it to my desktop
programmatically). But, how can I programmatically make a shortcut (with
the template startup switch) for any user?
I hope the question is clear.
TIA
--
Russ

drsmN0SPAMikleAThotmailD0Tcom.INVALID
Doug Robbins - Word MVP
2006-10-19 18:29:51 UTC
Permalink
You should put the addin in the

C:\Documents and Settings\" & uname & "\Application
Data\Microsoft\Word\Startup

folder.

Whatever is in it will then be available whenever Word is started.
--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
Post by zSplash
I have put an addin in the username's "C:\Documents and Settings\" & uname
& "\Application Data\Microsoft\Addins" folder, and the necessary templates
in the username's "C:\Documents and Settings\" & uname & "\Application
Data\Microsoft\Templates" folder.
The trouble is, I want to make a desktop shortcut to Word with a startup
switch pointing to a template in any user's Templates folder. I can do it
with myName (by making the shortcut, and copying it to my desktop
programmatically). But, how can I programmatically make a shortcut (with
the template startup switch) for any user?
I hope the question is clear.
TIA
Loading...