PC Review


Reply
Thread Tools Rate Thread

Distribute an excel workbook shortcut

 
 
Mike K
Guest
Posts: n/a
 
      23rd Feb 2010
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 With Quote
 
 
 
 
Peter T
Guest
Posts: n/a
 
      23rd Feb 2010
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" <(E-Mail Removed)> wrote in message
news:B8D2A88F-974D-4508-8801-(E-Mail Removed)...
> 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 With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is there a shortcut for unhiding an Excel sheet in a workbook? =?Utf-8?B?Q29sbGVlbg==?= Microsoft Excel Misc 3 26th May 2011 11:30 AM
Distribute Excel workbook with ActiveX controls. =?Utf-8?B?emhhbmcgeHU=?= Microsoft Excel Programming 0 23rd Jun 2006 07:14 PM
Create and distribute Shortcut? Doug Walch Microsoft Outlook Discussion 0 2nd Jun 2005 10:30 PM
Distribute Excel Workbook with licence? Mike MacSween Microsoft Excel Programming 19 18th Mar 2004 04:21 AM
Distribute Excel Workbook with licence? Mike MacSween Microsoft Excel Discussion 18 24th Feb 2004 11:54 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:32 AM.