I created a form in HTM format in WORD.
I can add a hyperlink to MAILTO: some people.
But, is there a way to change this hyperlink to send the page, opening up a
new email, have it already addressed and all I have to do now is SEND?

Re: SENDTO ? by Graham

Graham
Fri Oct 12 02:40:04 PDT 2007

You need a macro something along the lines of

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 = "recipient@somewhere.com"
.Subject = "New subject" 'subject text
.Body = "See attached document" 'e-mail body text
.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

You will need to set the Outlook object library in Word vba for this to
work.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

TimberWolfe21 wrote:
> I created a form in HTM format in WORD.
> I can add a hyperlink to MAILTO: some people.
> But, is there a way to change this hyperlink to send the page,
> opening up a new email, have it already addressed and all I have to
> do now is SEND?