#  Other Applications & Softwares  > Outlook Formatting & Functions >  >  Insert hyperlink in email

## shg

I frequently send emails (from Outlook) like this:
_
Kenny, Tim,

[Some document name] is on the share._

I copy the path on the share, select the words "on the share" in the email, right-click, select Hyperlink, and paste from the clipboard into the Address textbox. A macro would be handy.

Outlook uses Word as an editor, and this does what I want in Word:




```
Please Login or Register  to view this content.
```


I'd be grateful if some kind soul would show me how to code it for Outlook.

Cross-posted at https://www.mrexcel.com/board/thread...email.1190042/

----------


## rorya

I think something like this would be the literal equivalent:




```
Please Login or Register  to view this content.
```

----------


## shg

That looks great, Rory, thank you. Creating the DataObject object (which worked in Word) failed in Outlook, so I recoded as below and added a reference:




```
Please Login or Register  to view this content.
```


I was sure that was going to work, but the Hyperlinks.Add statement failed: "Object doesn't support this property or method." Got any magic for that?

If it matters, the message is in HTML format.

----------


## rorya

It should just be:




```
Please Login or Register  to view this content.
```


rather than:




```
Please Login or Register  to view this content.
```

----------


## shg

Of course, thank you.

I find the property naming odd that Inspector.WordEditor returns a Word document rather than the application object.

Thank you again, Rory.

Final code posted below for anybody that doesn't want to do their own edits.



```
Please Login or Register  to view this content.
```

----------


## rorya

> I find the property naming odd that Inspector.WordEditor returns a Word document rather than the application object.



As do I!  :Smilie:  (but then theres nothing normal about Word)

----------

