Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
![]()
I am trying to find out if I can create an automatic link (?hyperlink) that
when someone finishes filling out a survey I have created in word it will email the document as an attachment back to me by clicking the link. Can anyone help?? |
#2
![]()
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
![]()
If your users have Outlook, then you could run a macro, stored in the
document, similar to the following from a toolbar button. This sends the current document as attachment to the e-mail address entered without further prompting. Chances are that it wouldn't work as many users will sensibly block macros in third party documents, so it wouldn't run. The problem with a hyperlink will be in *automatically* attaching the document to the hyperlinked mail dialog. I may be wrong, but I don't think that is possible. Sub SendDocumentAsAttachment() Dim bStarted As Boolean Dim oOutlookApp As Outlook.Application Dim oItem As Outlook.MailItem On Error Resume Next If Len(ActiveDocument.Path) = 0 Then ActiveDocument.Save End If 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 .To = " .Subject = "New subject" .Body = "See attached document" .Attachments.Add Source:=ActiveDocument.FullName, Type:=olByValue .Send End With If bStarted Then oOutlookApp.Quit End If Set oItem = Nothing Set oOutlookApp = Nothing End Sub http://www.gmayor.com/installing_macro.htm -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Kookaburra16 wrote: I am trying to find out if I can create an automatic link (?hyperlink) that when someone finishes filling out a survey I have created in word it will email the document as an attachment back to me by clicking the link. Can anyone help?? |
Reply |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do you attach an email address link into an email letter | Microsoft Word Help | |||
Automatically creating links in word | Microsoft Word Help | |||
How do I link my index entries to my Word document automatically | Microsoft Word Help | |||
Email Link in word document | Mailmerge | |||
word form email link | New Users |