Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Microsoft Word 2013 Create Form

Posted on 2013-11-10
5
Medium Priority
?
850 Views
Last Modified: 2013-11-14
What is the simplest method of creating a form in Microsoft Word 2013 that will save the current document, attach it to a new email window with the recipients and subject line already filled in?  The user then just writes a quick message and sends it.

I've been searching all over the Internet, but most answers are for older versions of Word.  I need this to work in Word 2013 and Word 2010.

Any help is greatly appreciated!
0
Comment
Question by:ggriffin1000
  • 4
5 Comments
 
LVL 12

Expert Comment

by:Gregory Miller
ID: 39637550
Have you looked at InfoPath which does pretty much what you described but performs all the form and function within Outlook not Word. If this is not what you are wanting maybe a bit more detail on the process you are trying to achieve.
0
 

Author Comment

by:ggriffin1000
ID: 39637562
The following code works well in VBA:
    'Options.SendMailAttach = True
   ' ActiveDocument.SendMail

However, I also need to add recipients and a subject line when the new mail message window opens.

Also, to consider: on the MSDN website it states this code is for Exchange.  Clients are using Outlook as a POP/IMAP configuration and not Exchange.
0
 
LVL 12

Expert Comment

by:Gregory Miller
ID: 39637568
So do you have a word document with a button on it to send the same document to an email recipient and you want to it as an attachment, which you have working, and you want to specify the TO: address and Subject line content? Is this right?
0
 
LVL 12

Expert Comment

by:Gregory Miller
ID: 39637572
Sorry, one last question...
It the mail client the sender using always Outlook or is this an unknown?
0
 
LVL 12

Accepted Solution

by:
Gregory Miller earned 1500 total points
ID: 39637598
Here is a nifty little script that works well with Outlook clients...
Found Here: http://www.gmayor.com/word_vba_examples.htm

Sub SendDocumentAsAttachment()
'This macro requires the Outlook Object library to be checked
'in the vba editor Tools > References
Dim bStarted As Boolean
Dim oOutlookApp As Outlook.Application
Dim oItem As Outlook.MailItem
On Error Resume Next
If Len(ActiveDocument.Path) = 0 Then 'Document has not been saved
ActiveDocument.Save 'so save it
End If
'see if Outlook is running and if so turn your attention there
Set oOutlookApp = GetObject(, "Outlook.Application")
If Err <> 0 Then
'Outlook isn't running
'So fire it up
Set oOutlookApp = CreateObject("Outlook.Application")
bStarted = True
End If
'Open a new e-mail message
Set oItem = oOutlookApp.CreateItem(olMailItem)
With oItem 'and add the detail to it
.To = "someone@somewhere.com" 'send to this address
.Subject = "New subject" 'This is the message subject
.Body = "See attached document" ' This is the message body text
.Attachments.Add Source:=ActiveDocument.FullName, Type:=olByValue
.Display
'**********************************
'If you want to view the message before it goes
'change the line above from .Send to .Display
'Otherwise the message is sent straight to the Outbox
'and if you have Outlook set to send mail immediately,
'it will simply beSent
'with no obvious sign that Outlook has operated.
'Apart from the copy in the Outlook Sent folder
'**********************************
End With
If bStarted Then
'If the macro started Outlook, stop it again.
oOutlookApp.Quit
End If
'Clean up
Set oItem = Nothing
Set oOutlookApp = Nothing
End Sub
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes how to use the Send to Mail Recipient command. The instructions apply generally to Office 2007 and later versions, but Microsoft® Word 2013 was used for the specific steps and figures.  What is Send to Mail Recipient? Send…
This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
In this video, we show how to convert an image-only PDF file into a PDF Searchable Image file, that is, a file with both the image (typically from scanning) and text, which is created in an automated fashion with Optical Character Recognition (OCR) …
This video walks the viewer through the process of creating Hyperlinks for the web and other documents. Select the "Insert" tab: Click "Hyperlink":  Type "http://" followed by a web address to reference a website or navigate to a document to ref…

782 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question