Automation

I

incognito

I am looking for some hints/links to automate a tedious task: Inserting a
hyperlink into a cell that references to a specific document/picture. This
document is contained in a dedicated folder. However, the particular
document must be identified for each insertion by personal search. The
insertion of the link must not open the particular application
(Word/iPhoto/Photoshop) which created the document.
I am have been able to create a (trivially simple) Macro that can insert a
specific document but only the one I specify within the Macro. Every
comment is appreciated.
Rudolf
 
J

JE McGimpsey

incognito said:
I am looking for some hints/links to automate a tedious task: Inserting a
hyperlink into a cell that references to a specific document/picture. This
document is contained in a dedicated folder. However, the particular
document must be identified for each insertion by personal search. The
insertion of the link must not open the particular application
(Word/iPhoto/Photoshop) which created the document.
I am have been able to create a (trivially simple) Macro that can insert a
specific document but only the one I specify within the Macro. Every
comment is appreciated.

One way:

Public Sub InsertHyperlinkToFile()
Dim vResponse As Variant

vResponse = Application.GetOpenFilename( _
Title:="Insert Hyperlink to File", _
ButtonText:="Link", _
MultiSelect:=False)
If vResponse = False Then Exit Sub 'user cancelled
ActiveSheet.Hyperlinks.Add _
Anchor:=ActiveCell, _
Address:=vResponse, _
SubAddress:="hello", _
TextToDisplay:=vResponse
End Sub
 
I

incognito

I can¹t believe it, I just copied your Subroutine into a ³New Macros²,
eliminating the redundant ŒSub¹ and ŒEndSub¹ steps, and low and behold it
works wonderfully.
Now that I have grabbed your little finger, however, I like to grab your
hand: First, to thank you a 1000 times , it looks so easy and is very time
saving indeed.
What I need to do now, is to shorten/adapt the path to the document such
that I can send both the folder with the documents/pictures and the Excel
Worksheet to my children in such form that if they load both onto their
Mac/PC the inserted links will find the links automatically. (This is where
I need possibly your whole hand!)
I am very anxious to hear from you again ­ or should I post this additional
request in the Newsgroup?
Thanks for now!
Rudolf


JE McGimpsey wrote on 3/1/07 11:33 AM
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top