Today endusersharepoint.com published an article by Areon Jackson about sending a hyperlink of a document. As I think, a great hint for every SharePoint user. What you can see in his article are the steps to get the complete URL of the document to use it in your e-mail. I think, it’s easier for the end-user, to run a makro or just click a button to start writing the e-mail.

Here is the makro for Office Word (written with 2007, but it should work with 2010):

Sub SendHyperlink()

‘ SendHyperlink Makro


  Dim strDocLink
  Dim oOutlook
  Dim oMessage

  Set oOutlook = CreateObject(“Outlook.Application”)
  Set oMessage = oOutlook.CreateItem(olMailItem)

  strDocLink = ActiveDocument.Path & “/” & ActiveDocument.Name

  If (strDocLink = “”) Then
    MsgBox (“You need a document, stored in a library on a SharePoint machine, to use this function.”)
  Else
    If (UCase(Left(strDocLink, 4)) <> “HTTP”) Then
      MsgBox (“You need a document, stored in a library on a SharePoint machine, to use this function.”)
    Else
      oMessage.Body = “<” & strDocLink & “>”
      oMessage.Display
    End If
  End If

  oMessage = Null
  oOutlook = Null
End Sub

It’s a kind of Outlook automation. When you run the makro on a document, opened from SharePoint, a New Message window opens with the URL of the document in the mail body.

Advertisements