Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 61
Default paste file name of an OFFice program into a cell

I would like an Excel user to be able to go to a cell, and then paste the
file name ,(preferably without the full path, but that is not an absolute
need,) into the cell. The file will be in the same folder, and will be a
Word, Visio or Powerpoint file.
The purpose is an Excel 2003 sales CRM program, where sales types can add
the name of the contract or "sales pitch" to this cell on a shared network.
Then management will be able to click on the cell and review the sales
document
I am not a sophisticated user, with no working knowledge of VB or macros.
but I can follow directions
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default paste file name of an OFFice program into a cell

code will open a Pop-Up window and allow you to select a file then put in a
hyperlink to the file you select.

Sub AddLink()

CurrentDir = ThisWorkbook.Path
CurrentDir = "c:\temp"
FName = Application _
.GetOpenFilename( _
"Text Files (*.txt), *.txt," & _
"Power Point Files (*.ppt), *.ppt," & _
"Visio Files (*.vsd), *.vsd," & _
"All Files (*.*), *.*")

Set fs = CreateObject("Scripting.FileSystemObject")
FBaseName = fs.GetBaseName(FName)


ActiveCell.Hyperlinks.Add _
Anchor:=Selection, _
Address:=FName, _
TextToDisplay:=FBaseName

End Sub


"Henry" wrote:

I would like an Excel user to be able to go to a cell, and then paste the
file name ,(preferably without the full path, but that is not an absolute
need,) into the cell. The file will be in the same folder, and will be a
Word, Visio or Powerpoint file.
The purpose is an Excel 2003 sales CRM program, where sales types can add
the name of the contract or "sales pitch" to this cell on a shared network.
Then management will be able to click on the cell and review the sales
document
I am not a sophisticated user, with no working knowledge of VB or macros.
but I can follow directions

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
eula pops up every time i open an office program. office 2003 ins. ijscholl Excel Discussion (Misc queries) 0 July 28th 09 11:54 PM
Macro to Paste Data in Non-Office Program gplant Excel Programming 6 November 1st 07 09:05 PM
How can I get Office to activate a command in a non Office program Terry T. Excel Discussion (Misc queries) 1 December 16th 06 06:19 AM
Copying of cell text from one file to paste as cell comments in a 2nd file Wayne Excel Programming 4 March 2nd 05 05:05 AM
Paste cell content to another program Frank[_23_] Excel Programming 1 November 29th 04 06:09 PM


All times are GMT +1. The time now is 04:03 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"