![]() |
|
#5
|
||||
|
||||
|
It's still not clear what you want to do. ActiveDocument.FullName will return the document's full path and name, which you can then add to an email. For example, assuming early binding:
Code:
Sub Test()
Dim bStarted As Boolean
Dim oOutlookApp As Outlook.Application
Dim oItem As Outlook.MailItem
' Check if Outlook is running. If it is not, start Outlook
On Error Resume Next
Set oOutlookApp = GetObject(, "Outlook.Application")
If Err <> 0 Then
Set oOutlookApp = CreateObject("Outlook.Application")
bStarted = True
End If
Set oItem = oOutlookApp.CreateItem(olMailItem)
With oItem
.Subject = "Test"
.Body = "File://" & ActiveDocument.FullName
.To = "jack22@someaddress.com"
.Send
End With
' Close Outlook if it was started by this macro.
If bStarted Then
oOutlookApp.Quit
End If
'Clean up
Set oItem = Nothing: Set oOutlookApp = Nothing
End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Hyperlink to direct email | JaHoffman | Word | 5 | 07-05-2012 08:09 AM |
| Word macro to email hyperlink | pooley343 | Word VBA | 0 | 07-20-2011 01:48 AM |
| Hyperlink to attached file in email message | spino | Outlook | 0 | 08-05-2010 05:56 AM |
| cannot access hyperlink in email | mdrvo | Outlook | 1 | 05-31-2010 12:35 PM |
| Cannot hyperlink from an email | karen1430 | Outlook | 0 | 11-25-2007 03:54 PM |