|
Daniel Simaan
Posts: 3
Joined: 2024-11-04
|
|
Posted 04 Nov, 2024 08:40:34
|
|
Top
|
|
Andrei Smolin
Add-in Express team
Posts: 19011
Joined: 2006-05-11
|
Hello Daniel,
What exactly doesn't work?
Regards from Poland (GMT+1),
Andrei Smolin
Add-in Express Team Leader |
|
Posted 04 Nov, 2024 10:15:10
|
|
Top
|
|
Daniel Simaan
Posts: 3
Joined: 2024-11-04
|
Hello,
I just want to update the current email in the compose window update the subject, and essentially hit the send button on the compose window.
Thanks for your help.
Exception Source: Microsoft Outlook
Exception Type: System.Runtime.InteropServices.COMException
Exception Message: We need to know who to send this to. Make sure you enter at least one name.
Exception Target Site: Send
---- Stack Trace ----
Microsoft.Office.Interop.Outlook._MailItem.Send()
Microsoft.Office.Interop.Outlook.dll: N 00000 (0x0) JIT
CabrilloSendSecure.AddinModule.adxRibbonButton1_OnClick(sender As Object, control As IRibbonControl, pressed As Boolean)
AddinModule.cs: line 0075, col 13, IL 0026 (0x1A)
AddinExpress.MSO.ADXRibbonButton.DoInternalAction(e As ADXRibbonOnActionEventArgs)
Microsoft.Office.Interop.Outlook.dll: N 0035 (0x23) IL |
|
Posted 04 Nov, 2024 16:01:04
|
|
Top
|
|
Andrei Smolin
Add-in Express team
Posts: 19011
Joined: 2006-05-11
|
Hello Daniel,
The error message says you haven't provided a recipient to send your email to.
Regards from Poland (GMT+1),
Andrei Smolin
Add-in Express Team Leader |
|
Posted 05 Nov, 2024 09:40:33
|
|
Top
|
|
Daniel Simaan
Posts: 3
Joined: 2024-11-04
|
Hi Andrei,
Thanks for your reply. I would like to place a button on the compose email window that simply updates the subject and sends the current email window (the user would have already filled in who they wanted to send the emails to.
Thanks,
Daniel |
|
Posted 05 Nov, 2024 17:10:57
|
|
Top
|
|
Andrei Smolin
Add-in Express team
Posts: 19011
Joined: 2006-05-11
|
Hello Daniel,
Split the task into steps steps. Open a compose email Inspector window; make sure that your button is shown there; make sure that clicking the button invokes a method that raises a signal when invoked. Then complicate the method: get the Inspector window where the email is prepared and display a message box showing Inspector.Caption. Then use Inspector.CurrentItem to get the email; CurrentItem returns an Object, you need to cast it to Outlook.MailItem. Make sure that MailItem.Subject returns the same string as Inspector.Caption. Once this is okay, change MailItem.Subject *and* call MailItem.Save; this would create an email - supposedly in Drafts - with the subject changed. Once this is done, make sure your button is only shown in such Inspector windows, and it is not shown anywhere else. The last step would be to call MailItem.Send.
Regards from Poland (GMT+1),
Andrei Smolin
Add-in Express Team Leader |
|
Posted 05 Nov, 2024 18:14:51
|
|
Top
|
|