Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Ray
 
Posts: n/a
Default Convert URL Text to Individual URL Shortcut

I have a spreadsheet containing these two columns: Website, URL

In the Website column, I have entries like this:
1888PetMeds.com - America's Pet Health Resource

In the URL column, I have corresponding URLs like this:
http://1888petmeds.com/

I want to create an individual URL file, bearing the Website name, that
contains the URL contents. For example, the file with this name:
1888PetMeds.com - America's Pet Health Resource.url

would have these contents:

[InternetShortcut]
URL=http://1888petmeds.com/

when viewed in Notepad. I would then be able to click on the PetMeds
shortcut and watch as Firefox opens the PetMeds webpage.

My question: how can I convert each row of the spreadsheet so as to
create the corresponding URL shortcut file, as shown above?

  #2   Report Post  
Posted to microsoft.public.excel.misc
Don Guillett
 
Posts: n/a
Default Convert URL Text to Individual URL Shortcut

If you type the url shown in blue below excel should make it a hyperlink
or you could use follow hyperlink within a double_click event and save some
typing.

--
Don Guillett
SalesAid Software

"Ray" wrote in message
ups.com...
I have a spreadsheet containing these two columns: Website, URL

In the Website column, I have entries like this:
1888PetMeds.com - America's Pet Health Resource

In the URL column, I have corresponding URLs like this:
http://1888petmeds.com/

I want to create an individual URL file, bearing the Website name, that
contains the URL contents. For example, the file with this name:
1888PetMeds.com - America's Pet Health Resource.url

would have these contents:

[InternetShortcut]
URL=http://1888petmeds.com/

when viewed in Notepad. I would then be able to click on the PetMeds
shortcut and watch as Firefox opens the PetMeds webpage.

My question: how can I convert each row of the spreadsheet so as to
create the corresponding URL shortcut file, as shown above?



  #3   Report Post  
Posted to microsoft.public.excel.misc
Gary''s Student
 
Posts: n/a
Default Convert URL Text to Individual URL Shortcut

Let's say that in column A we have URLs and in column B we have website names:


http://www.cnn.com news
http://www.microsoft.com microsoft

Then the following code:


Sub CreateShortCut()
Dim oWSH As Object
Dim oShortcut As Object
Dim sPathDeskTop As String
For i = 1 To 2
Set oWSH = CreateObject("WScript.Shell")
sPathDeskTop = oWSH.SpecialFolders("Desktop")
Set oShortcut = oWSH.CreateShortCut(sPathDeskTop & "\" & _
Cells(i, 2).Value & ".lnk")
With oShortcut
.targetpath = Cells(i, 1).Value
.Save
End With
Set oWSH = Nothing
Set oShortcut = Nothing
Next
End Sub

Will create two internet shortcuts on the desktop.

This is an adaptation of the code Bob Phillips posted last month.

http://www.microsoft.com/communities...c-1c3bd832bbd6

Change the For loop to match the number of your entries.
--
Gary''s Student


"Ray" wrote:

I have a spreadsheet containing these two columns: Website, URL

In the Website column, I have entries like this:
1888PetMeds.com - America's Pet Health Resource

In the URL column, I have corresponding URLs like this:
http://1888petmeds.com/

I want to create an individual URL file, bearing the Website name, that
contains the URL contents. For example, the file with this name:
1888PetMeds.com - America's Pet Health Resource.url

would have these contents:

[InternetShortcut]
URL=http://1888petmeds.com/

when viewed in Notepad. I would then be able to click on the PetMeds
shortcut and watch as Firefox opens the PetMeds webpage.

My question: how can I convert each row of the spreadsheet so as to
create the corresponding URL shortcut file, as shown above?


  #4   Report Post  
Posted to microsoft.public.excel.misc
Ray
 
Posts: n/a
Default Convert URL Text to Individual URL Shortcut

Thanks for these replies. I wish I were more comfortable with Excel
macros. I would have liked to try using this one for the problem.
Given my limitations, I defaulted to an older approach with which I am
more familiar. I have posted a writeup of my solution in
alt.msdos.batch, posted today, at this location:
http://tinyurl.com/ro7pe

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
Convert Data Range in to individual values mistryrg Excel Discussion (Misc queries) 2 June 7th 06 04:48 PM
How to convert text to numbers pago Excel Discussion (Misc queries) 5 March 31st 06 04:38 PM
Formulas dealing with text data Bagia Excel Worksheet Functions 6 June 20th 05 10:29 PM
convert a range of lowercase text to upper text or vice versa jackdaw Excel Worksheet Functions 2 May 16th 05 09:31 PM
Convert data of cells to any type: Number, Date&Time, Text Kevin Excel Discussion (Misc queries) 0 December 30th 04 06:55 AM


All times are GMT +1. The time now is 12:42 PM.

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"