View Single Post
 
Old 05-24-2012, 11:03 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,341
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

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
(substitute a valid email address)
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote