Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default copy application path to clipboard

I'm simplifying the way we shoot Excel files (and other office
documents) around our office.

Ideally I thought I'd just write a little macro tied to a button to
copy/paste the full document path to the clipboard where we'd paste
that into an email. Object model suggests something this method:
Workbook.ActiveWorkbook.FullNameURLEncoded

Unfortunately, FullNameURLEncoded gives the mapped drive instead of
the UNC - i.e., z:\work\file.xlsx instead of \\server\id\work
\file.xlsx.

Any suggestions on simple sharing full document paths with UNC?

And - a related annoyance - Office 2003 made it simple to include the
HTML path to the toolbar; anybody shed insight on adding Document
Location to the Quick Access Toolbar (as I've done through Word
Options Customize) through a macro?

Thanks,
Jeff
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default copy application path to clipboard

try this as the full path of your file:

ActiveWorkbook.Path & "\" & ActiveWorkbook.Name
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default copy application path to clipboard

Mm - looks like using the WshNetwork Object is the way to get the full
path - hence not exactly an Excel VBA function, you might say.

People trying to do the same thing:
http://www.spyjournal.biz/exceltips/...tranet-to.html

Cool code inventorying UNCs curried from:
http://www.dailydoseofexcel.com/arch...6/21/unc-path/
--------------------------------------
Sub NetworkMapDrive()
Dim WshNetwork As Object
Dim oDrives As Object
Dim DrivesStr As String
Dim i As Integer

Set WshNetwork = CreateObject("WScript.Network")
Set oDrives = WshNetwork.EnumNetworkDrives
DrivesStr = "Network drive Mappings:" & Chr(13)
For i = 0 To oDrives.Count - 1 Step 2
DrivesStr = DrivesStr & "Drive " & oDrives.Item(i) & " = " &
oDrives.Item(i + 1) & Chr(13)
Next
MsgBox DrivesStr
End Sub
--------------------------------------

Thanks,
jn

On Mar 9, 11:05*am, docksi wrote:
try this as the full path of your file:

ActiveWorkbook.Path & "\" & ActiveWorkbook.Name


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
Application Path Glenn Suggs Excel Programming 1 September 21st 06 03:44 PM
function: copy current path or filename to clipboard (XLS) Markus Excel Programming 0 May 22nd 06 11:28 AM
Excel <- Application clipboard data transfer Andreas Koenig Excel Programming 0 July 31st 04 09:35 PM
set path for Application.Run zSplash Excel Programming 1 January 28th 04 09:41 PM
Application.Path Simon Davies Excel Programming 1 November 12th 03 04:52 PM


All times are GMT +1. The time now is 01:21 AM.

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"