I drew it from scratch so as to make it as large as the button could hold.
As it appears to be snagged from the screen it's too small. I don't get a
prompt that the shortcut was created. Oops, you mean that the McAfee
warning serves as one? That's very true. I hadn't thought of it that way.
Good thought, Pollyanna!
At 11:20 AM 2006-05-28, you wrote:
At 08:26 AM 5/28/2006, Eve Golden typed:
==code starts below==
Sub CreateShortcutforActiveDocument()
Dim DesktopFolder As String
Dim DocumentFullName As String
Dim DocumentName As String
DocumentFullName = ActiveDocument.FullName
DocumentName = ActiveDocument.Name
If Len(Dir(DocumentFullName)) = 0 Then
MsgBox "First you need to save the document.", vbInformation
Exit Sub
End If
With CreateObject("WScript.Shell")
DesktopFolder = .SpecialFolders("Desktop")
With _
.CreateShortcut _
( _
DesktopFolder & "\" & _
Left(DocumentName, Len(DocumentName) - 4) & _
".lnk" _
)
.TargetPath = DocumentFullName
.WindowStyle = vbNormalFocus
.Description = DocumentName
.Save
End With
End With
End Sub
'==code ends==
If I were you I'd add to the end of this
End With
' Display Message Box with results.
Response = MsgBox("Shortcut Created")
End With
End Sub
Then you at least get a prompt that the Shortcut was indeed Created but
otherwise it's very nice.
In the button editor did you snag the shortcut arrow or draw it from
scratch? It's too bad that Word doesn't let you import images here.
----------+----------
Wayne D. Johnson
Ashland, OH, USA 44805
<http://www.wavijo.com>
--
----------------------------------------
WIN-HOME Archives: http://PEACH.EASE.LSOFT.COM/archives/WIN-HOME.html
Contact the List Owner about anything: [EMAIL PROTECTED]
Official Win-Home List Members Profiles Page
http://www.besteffort.com/winhome/Profiles.html
--
----------------------------------------
WIN-HOME Archives: http://PEACH.EASE.LSOFT.COM/archives/WIN-HOME.html
Contact the List Owner about anything: [EMAIL PROTECTED]
Official Win-Home List Members Profiles Page
http://www.besteffort.com/winhome/Profiles.html