Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #5  
Old 05-24-2012, 11:03 PM
macropod's Avatar
macropod macropod is offline need to email hyperlink (filepath) from word doc Windows 7 64bit need to email hyperlink (filepath) from word doc Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,516
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
 



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

Other Forums: Access Forums

All times are GMT -7. The time now is 09:31 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft