How do I import web address from Excel and turn them into hyperlin

J

jay-rod

I have an online business that sells on Amazon.com and want to send an e-mail
to all my customers to leave feedback. Each customer has a specific link for
their order #.

But when I try to import those links into the document from excel they are
the full 50+ character link, I want to format them to say "this link".

So far I've done the whole mailings>e-mail>recipients from excel document.
And I can insert the column data with no problem, but when I tried edit it as
a hyperlink it wouldn't let me as all the data will vary for each recipient.

Thank you for your help in advance!

-Jarred
 
G

Graham Mayor

Are your customers going to appreciate being harrassed in this way? You
might lose more future business than you gain.

A method to read an Excel range is covered at
http://word.mvps.org/FAQs/InterDev/XLToWordWithDAO.htm

It is not clear from your message what exactly it is you want to do, but to
read a named range (a column of e-mail addresses named eMail) from an Excel
sheet (D:\My Documents\Test\Name.xlsx) and write the content of each field
in turn to a hyperlink to a new document, with the display text as "This
Link", the following will work. All you need to do is adapt the while
....wend process to reflect your own conditions.

Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim oDoc As Document
Set db = OpenDatabase("D:\My Documents\Test\Name.xlsx", False, False, "Excel
8.0")
Set rs = db.OpenRecordset("SELECT * FROM eMail")
While Not rs.EOF
Set oDoc = Documents.Add
oDoc.Range.Hyperlinks.Add oDoc.Range, _
Address:="MailTo: " & Trim(rs.Fields(0).Value), TextToDisplay:="This
Link"
rs.MoveNext
Wend
rs.Close
db.Close
Set rs = Nothing
Set db = Nothing

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 

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