![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
I have a program that pastes the contents of a word document into an email
message. (See Below) Now what I need to do is programatically click the Send button. I realize there are easier ways to send an email, but I need to be able to cut and paste exactily what is in the word document. The question is, how to use either the inspector object or whatever to click that send button. mail = (Outlook.MailItem)oMailFolder.Items.Add(Outlook.Ol ItemType.olMailItem); object start = WordApp.MergeDoc.Content.Start; object end = WordApp.MergeDoc.Content.End; Word.Range range = WordApp.MergeDoc.Range(ref start, ref end); range.Copy(); //Put Contents into clipboard inspector = mail.GetInspector; if (inspector.EditorType == OlEditorType.olEditorWord) { Word.Document WordEditor = (Word.Document)inspector.WordEditor; start = WordEditor.Content.Start; end = WordEditor.Content.End; Word.Range range2 = WordEditor.Range(ref start, ref end); range2.Paste(); } //Click Send Button Thanks!! bob |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Outlook : Run the VBA macro on send button click | masani paresh[_2_] | Outlook and VBA | 10 | February 10th 09 03:22 PM |
Commandbar Button Click Handler | saturn | Add-ins for Outlook | 1 | August 7th 07 09:39 PM |
An event raise twice when click the button. | David | Add-ins for Outlook | 0 | July 16th 06 12:25 PM |
click a button on the toolbar (via VBA?) | Dan | Outlook and VBA | 7 | May 2nd 06 09:35 AM |
click a button on the toolbar (via VBA?) | Dan | Outlook - General Queries | 2 | May 1st 06 01:39 PM |