Solved

Microsoft Word 2013 Create Form

Posted on 2013-11-10
5
809 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 11

Expert Comment

by:Technodweeb
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 11

Expert Comment

by:Technodweeb
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 11

Expert Comment

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

Accepted Solution

by:
Technodweeb earned 500 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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

I'm writing to share my clumsy experience in using this elegant tool so you can avoid every stupid mistake I made. (I leave it to the authorities to decide if this deserves a place in the Knowledge archives.)  Now that I am on the other side of my l…
Introduction This tutorial provides instructions on how to properly format your Word document using the inbuilt tools provided. The benefits of using these tools means your documents are more accessible and easily portable to other applications an…
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…
Office 365 is currently available in five editions. Three of them are for business use: Office 365 Business Essentials, Office 365 Business, and Office 365 Business Premium. Two of them are for home/personal use: Office 365 Home and Office 365 Perso…

813 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now