![]() |
#1
|
|||
|
|||
![]()
Ok,
I have searched and tried many methods and they have all failed. I have created a word document that has a text field in it for my user to input an answer to a question I provide. I then want to add an email submit button to the word document so that when the user is finished then just click the button and the word document and the users response will be sent to an email address. I have read many times and tried to add the sub program to the virtual basic content below..... Private Sub CommandButton1_Click() Dim olApp As Object Dim olMsg As Object Set olApp = CreateObject("Outlook.Application") Set olMsg = olApp.CreateItem(0) With olMsg .To = "email add" .Subject = "subject" .Body = "body" .Attachments.Add Me.Path + "\" + Me.Name .Send End With Set olMsg = Nothing Set olApp = Nothing End Sub I recieve the run-time error '-2147467259 (80004005)' When I debug the program it has a problem with the line of code .Send I am using Word 2011 Any one have a suggest that someone like myslef that doesn't understand half of the code I am using right now.....laymans terms please!!! |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
salin | Outlook | 3 | 11-16-2011 06:09 PM |
![]() |
Jamal NUMAN | Word | 2 | 06-26-2011 01:38 AM |
Drag Button which refers to the active Word document to Explorer | DRob | Word | 0 | 10-03-2010 06:40 AM |
MS Word form - email button | floydwood | Word VBA | 0 | 05-10-2009 04:11 PM |
Adding bullets in a protected Word document | Cindylu3 | Word | 0 | 10-03-2008 03:16 PM |