How do I set the address of a Hyperlink variable?

Question
How do I set the address of a Hyperlink variable?

Code
Dim strUrl As String
Dim hyper_Url As Hyperlink

'Start URL
strUrl = "https://www.google.com/maps/dir/

hyper_Url.Address = strUrl   '<------ this line errors out

What I'm trying to do
Build a URL for Google Maps direction.

The Whys
I can load the URL as a string in a browser, but when I try to send it in an email the email recognizes the first part of the URL and not the addresses I add.  So the user clicks on the URL in the email and doesn't get the map.  My thought is that if I had a Hyperlink variable to the email, it will work.

Thanks in advance for any help.
LJG
LVL 2
LJGAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

NorieAnalyst Assistant Commented:
How are you creating the email?
Gustav BrockCIOCommented:
The syntax for a link field content is:

    DisplayValue#LinkValue#

For example:

strURL = "Google Maps#https://www.google.com/maps/dir/#" 

Open in new window

LJGAuthor Commented:
Thanks for Responding

However I'm don't think that is the answer for me.

What I know from experimenting  -- Using Outlook

If I send ---> "Google Maps#https://www.google.com/maps/dir/#"
                .HTMLBody =strURL
                                   or
                .Body =strURL
I do not get a hyperlink in the email.

-----------------------
If I send ---> "https://www.google.com/maps/dir/
                .Body =strURL

I get a hyperlink in the email.
-------------------------

I can make the above work for me, but I thought maybe there was a way that Gustav talked about that I could get it to show in the email as "Google Maps" and when they clicked on "Google Maps" it would take them to my link.
NorieAnalyst Assistant Commented:
Why not use HTMLBody with the appropriate HTML code for the hyperlink?
.HTMLBody = "<a href=" & strURL & ">Google Maps</a>"

Open in new window

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
LJGAuthor Commented:
Thanks so much - this solves my problem
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Google

From novice to tech pro — start learning today.