Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
Kookaburra16 Kookaburra16 is offline
external usenet poster
 
Posts: 1
Default creating link to automatically email a word doc

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   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default creating link to automatically email a word doc

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

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How do you attach an email address link into an email letter rayray Microsoft Word Help 1 May 1st 07 09:18 PM
Automatically creating links in word Spanudiez Microsoft Word Help 1 November 15th 05 12:27 AM
How do I link my index entries to my Word document automatically mrcalc Microsoft Word Help 4 August 24th 05 10:59 PM
Email Link in word document Marzieh Tarassod Mailmerge 1 June 30th 05 09:27 PM
word form email link ChuckB New Users 0 May 13th 05 12:04 AM


All times are GMT +1. The time now is 05:35 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"