Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
Ray7071 Ray7071 is offline
external usenet poster
 
Posts: 2
Default How do I send a document as attachment and fill in email address?

I have created a Word 2000 Document as a Form. On the Form I have a Button
which can send the whole Form (Document) as a Mail Attachment by using the
following (which i copied from the help file by searching around)...

Private Sub CommandButton1_Click()
Options.SendMailAttach = True
ActiveDocument.SendMail

End Sub

When the Buton is 'Clicked' it Opens Outlook Express with the Form attached
OK. So far - so good.

How can I arrange for the Button to ALSO fill in the email address i.e the
'To:' Address with an address of my choice thus automating the return of the
filled form to me? At prewsent a user has to fill in my email address and
could (often does) make a mistake.

Finally, will the Button work with earlier and later versions of 'Word'

Thanks, Ray7071
  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default How do I send a document as attachment and fill in email address?

I think that you are going to have to use Outlook for this, not Outlook
Express because AFAIK it cannot be automated.

See the article "How to send an email from Word using VBA" at:

http://www.word.mvps.org/FAQs/InterDev/SendMail.htm


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"Ray7071" wrote in message
...
I have created a Word 2000 Document as a Form. On the Form I have a Button
which can send the whole Form (Document) as a Mail Attachment by using the
following (which i copied from the help file by searching around)...

Private Sub CommandButton1_Click()
Options.SendMailAttach = True
ActiveDocument.SendMail

End Sub

When the Buton is 'Clicked' it Opens Outlook Express with the Form
attached
OK. So far - so good.

How can I arrange for the Button to ALSO fill in the email address i.e the
'To:' Address with an address of my choice thus automating the return of
the
filled form to me? At prewsent a user has to fill in my email address and
could (often does) make a mistake.

Finally, will the Button work with earlier and later versions of 'Word'

Thanks, Ray7071



  #3   Report Post  
Posted to microsoft.public.word.docmanagement
alborg alborg is offline
external usenet poster
 
Posts: 67
Default How do I send a document as attachment and fill in email address?

Hi Ray:

You might wish to look into the SendObject Action, selecting all the text in
your document and sending it off either as a txt or rtf among other document
types.

URL: http://msdn.microsoft.com/en-us/libr...ffice.10).aspx

Cheers,
Al

"Ray7071" wrote:

I have created a Word 2000 Document as a Form. On the Form I have a Button
which can send the whole Form (Document) as a Mail Attachment by using the
following (which i copied from the help file by searching around)...

Private Sub CommandButton1_Click()
Options.SendMailAttach = True
ActiveDocument.SendMail

End Sub

When the Buton is 'Clicked' it Opens Outlook Express with the Form attached
OK. So far - so good.

How can I arrange for the Button to ALSO fill in the email address i.e the
'To:' Address with an address of my choice thus automating the return of the
filled form to me? At prewsent a user has to fill in my email address and
could (often does) make a mistake.

Finally, will the Button work with earlier and later versions of 'Word'

Thanks, Ray7071

  #4   Report Post  
Posted to microsoft.public.word.docmanagement
Suzanne S. Barnhill Suzanne S. Barnhill is offline
external usenet poster
 
Posts: 33,624
Default How do I send a document as attachment and fill in email address?

The referenced article seems to refer to Access, and the result seems to
send the object (and none of the objects described is a Word document, much
less a protected form) in the body of the email. If the arguments in the
SendObject Action that provide the recipient, subject line, etc., are
applicable to a Word VBA command, however, this would be helpful.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA

"alborg" wrote in message
...
Hi Ray:

You might wish to look into the SendObject Action, selecting all the text
in
your document and sending it off either as a txt or rtf among other
document
types.

URL: http://msdn.microsoft.com/en-us/libr...ffice.10).aspx

Cheers,
Al

"Ray7071" wrote:

I have created a Word 2000 Document as a Form. On the Form I have a
Button
which can send the whole Form (Document) as a Mail Attachment by using
the
following (which i copied from the help file by searching around)...

Private Sub CommandButton1_Click()
Options.SendMailAttach = True
ActiveDocument.SendMail

End Sub

When the Buton is 'Clicked' it Opens Outlook Express with the Form
attached
OK. So far - so good.

How can I arrange for the Button to ALSO fill in the email address i.e
the
'To:' Address with an address of my choice thus automating the return of
the
filled form to me? At prewsent a user has to fill in my email address
and
could (often does) make a mistake.

Finally, will the Button work with earlier and later versions of 'Word'

Thanks, Ray7071




  #5   Report Post  
Posted to microsoft.public.word.docmanagement
alborg alborg is offline
external usenet poster
 
Posts: 67
Default How do I send a document as attachment and fill in email addre

Hi Suzanne:

Yeah, you're right. The sendobject action will work in MS Word, but only to
place the text within the body of the email. It doesn't allow attachments
from within the MS Word platform, which is too bad- it is a fast and slick MS
Access action!

Anyhow, for those interested in seeing how it works in a limited manner,
download the Word template called "Gettysburg Address" here-
http://www.box.net/shared/static/70zd8lhk40.dot. All you have to do is to
bring it up, then click on the toolbar item called
"Project.AutoMacros.popuserform". Once you place your email in the textbox
supplied on the form, it'll scoop up the template's Gettysburg Address text
and send it off in the email, sans the picture of Abraham Lincoln.

Cheers,
Al

"Suzanne S. Barnhill" wrote:

The referenced article seems to refer to Access, and the result seems to
send the object (and none of the objects described is a Word document, much
less a protected form) in the body of the email. If the arguments in the
SendObject Action that provide the recipient, subject line, etc., are
applicable to a Word VBA command, however, this would be helpful.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA

"alborg" wrote in message
...
Hi Ray:

You might wish to look into the SendObject Action, selecting all the text
in
your document and sending it off either as a txt or rtf among other
document
types.

URL: http://msdn.microsoft.com/en-us/libr...ffice.10).aspx

Cheers,
Al

"Ray7071" wrote:

I have created a Word 2000 Document as a Form. On the Form I have a
Button
which can send the whole Form (Document) as a Mail Attachment by using
the
following (which i copied from the help file by searching around)...

Private Sub CommandButton1_Click()
Options.SendMailAttach = True
ActiveDocument.SendMail

End Sub

When the Buton is 'Clicked' it Opens Outlook Express with the Form
attached
OK. So far - so good.

How can I arrange for the Button to ALSO fill in the email address i.e
the
'To:' Address with an address of my choice thus automating the return of
the
filled form to me? At prewsent a user has to fill in my email address
and
could (often does) make a mistake.

Finally, will the Button work with earlier and later versions of 'Word'

Thanks, Ray7071





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
Send Document as email attachment JD2 Microsoft Word Help 0 June 12th 08 07:40 AM
Send Word Document as an Email - Not as an attachment kend_beledm New Users 16 April 11th 08 11:21 PM
How do I send results from a fill in form to an email address? Danny G. Microsoft Word Help 0 September 26th 06 07:34 PM
allow Word to send document as the email itself not an attachment stupified in Wisconsin Microsoft Word Help 2 May 27th 06 06:21 PM
Hot to send a PDF document as an email but not as an attachment OMNIPLEX Page Layout 2 April 20th 06 10:25 PM


All times are GMT +1. The time now is 05:38 PM.

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"