Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 104
Default Distribute an excel workbook shortcut

Oh Wise Ones,
Please forgive me if this is not the proper forum
for this question but I'm not sure where to post it, and I feel some of you
may have encountered this before. I have an excel spreadsheet that I would
like to place a shortcut to on peoples desktops with the file to open
readonly. Has anyone done this before? I guess it would require some type of
batch file. I would send it as a link in Outlook and the recipients would
double-click on the attachment, then the shortcut would be installed to their
desktop to be opened readonly when started. It's a local office so I know
everyone. Yes everyone has access to the network location.

File "Safety reporting form"
Location S:\files\shared\safety\Safety reporting form.xla


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Distribute an excel workbook shortcut

See this link

http://vbnet.mvps.org/index.html?cod...esktoplink.htm

Include all the declarations at the top of the module and the following
functions
CreateDesktopLink
GetSpecialFolder
TrimNull

' try this to test it
Sub test()
Dim sFile As String
Dim sPathToDesktop As String

sFile = ActiveWorkbook.FullName ' a previously saved workbook

' n/a in Excel 2000, replace app.hwnd with GetDeskTopWindow (search for it)
sPathToDesktop = GetSpecialFolder(Application.hWnd, CSIDL_DESKTOPDIRECTORY)

CreateDesktopLink sFile, sPathToDesktop
End Sub


If you need to cater for Excel 2000 add this API
Private Declare Function GetDesktopWindow Lib "user32.dll" () As Long

and change Application.hwnd to GetDesktopWindow

Regards,
Peter T


"Mike K" wrote in message
...
Oh Wise Ones,
Please forgive me if this is not the proper forum
for this question but I'm not sure where to post it, and I feel some of
you
may have encountered this before. I have an excel spreadsheet that I
would
like to place a shortcut to on peoples desktops with the file to open
readonly. Has anyone done this before? I guess it would require some type
of
batch file. I would send it as a link in Outlook and the recipients would
double-click on the attachment, then the shortcut would be installed to
their
desktop to be opened readonly when started. It's a local office so I know
everyone. Yes everyone has access to the network location.

File "Safety reporting form"
Location S:\files\shared\safety\Safety reporting form.xla




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
distribute rows from one workbook to other workbooks JD Excel Discussion (Misc queries) 3 November 14th 07 02:21 PM
Distribute a secure Workbook scott56hannah Excel Discussion (Misc queries) 1 June 25th 07 02:09 PM
Distribute Excel workbook with ActiveX controls. zhang xu[_2_] Excel Programming 0 June 23rd 06 07:14 PM
How to distribute a workbook as a stand-alone application? Paul Gallagher Excel Programming 5 March 16th 05 09:53 PM
Distribute Excel Workbook with licence? Mike MacSween Excel Programming 10 February 24th 04 03:01 PM


All times are GMT +1. The time now is 06:53 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"