N
njdude
I would like to acheive this. Please read below.
the Answers im looking for
With MAPIMessage & MAPISendMail and tried to set the messageType to
myform. Somehow it does not like it. I dont know why . It throws an
error saying invalid type
Or is there any way to communicate with a Outlook Addin from Excel so
that I can just activate the button click on the already opened
Outlook ?
I have a custom outlook form which i have created. I have created an
VSTO Addin in outlook which handles a button in the ribbon to launch
this form and then some details have to be filled in by the user and
the email is sent. the user can attach documents as well. This works
perfectly.
Now If a user uses excel i want to provide him the option to open this
particular email form with the excel document he is using attached to
the email. I have built an Excel addin to handle a ribbon button which
allows a user to launch this mail form. Im presently using the code
below
outLookAppln = new OutLook.Application();
OutLook.MAPIFolder templateFolder =
outLookAppln.Session.GetDefaultFolder(Microsoft.Office.Interop.Outlook.OlDefaultFolders.olFolderInbox);
myItem =
(OutLook.MailItem)templateFolder.Items.Add("IPM.Note.MyForm");
outLookAppln.ItemSend += new
Microsoft.Office.Interop.Outlook.ApplicationEvents_11_ItemSendEventHandler(outLookAppln_ItemSend);
string strSourceFileName = docFileName;
string strDisplayName = "Attachment";
int intPosition = 1;
int intAttachType =
(int)OutLook.OlAttachmentType.olByValue;
OutLook.Attachment oAttach =
myItem.Attachments.Add(docFileName, intAttachType, intPosition,
strDisplayName);
myItem.Display(objFalse);
Everything works except that i have a button in the form which
basically lets users select recipients from the Outlook Address book
with specific properties. This will launch an addressbook UI with all
the relevant recipients. Im using Extended MAPI to get recipients.
Everything is fine till i add the selected recips to myItem and call
Resolve . Then I get the Outlook Security Popup.
So what is the solution to this
I tried using MAPIMessage & MAPISendMail and tried to set the
messageType to myform. Somehow it does not like it. I dont know why .
If this works then Excel can launch the form without any issues and i
dont think the security dialog will popup because it is running in
outlooks context.
Or is there any way to communicate with the Outlook Addin so that I
can just activate the button click on the already opened Outlook ?
Please help !!
the Answers im looking for
With MAPIMessage & MAPISendMail and tried to set the messageType to
myform. Somehow it does not like it. I dont know why . It throws an
error saying invalid type
Or is there any way to communicate with a Outlook Addin from Excel so
that I can just activate the button click on the already opened
Outlook ?
I have a custom outlook form which i have created. I have created an
VSTO Addin in outlook which handles a button in the ribbon to launch
this form and then some details have to be filled in by the user and
the email is sent. the user can attach documents as well. This works
perfectly.
Now If a user uses excel i want to provide him the option to open this
particular email form with the excel document he is using attached to
the email. I have built an Excel addin to handle a ribbon button which
allows a user to launch this mail form. Im presently using the code
below
outLookAppln = new OutLook.Application();
OutLook.MAPIFolder templateFolder =
outLookAppln.Session.GetDefaultFolder(Microsoft.Office.Interop.Outlook.OlDefaultFolders.olFolderInbox);
myItem =
(OutLook.MailItem)templateFolder.Items.Add("IPM.Note.MyForm");
outLookAppln.ItemSend += new
Microsoft.Office.Interop.Outlook.ApplicationEvents_11_ItemSendEventHandler(outLookAppln_ItemSend);
string strSourceFileName = docFileName;
string strDisplayName = "Attachment";
int intPosition = 1;
int intAttachType =
(int)OutLook.OlAttachmentType.olByValue;
OutLook.Attachment oAttach =
myItem.Attachments.Add(docFileName, intAttachType, intPosition,
strDisplayName);
myItem.Display(objFalse);
Everything works except that i have a button in the form which
basically lets users select recipients from the Outlook Address book
with specific properties. This will launch an addressbook UI with all
the relevant recipients. Im using Extended MAPI to get recipients.
Everything is fine till i add the selected recips to myItem and call
Resolve . Then I get the Outlook Security Popup.
So what is the solution to this
I tried using MAPIMessage & MAPISendMail and tried to set the
messageType to myform. Somehow it does not like it. I dont know why .
If this works then Excel can launch the form without any issues and i
dont think the security dialog will popup because it is running in
outlooks context.
Or is there any way to communicate with the Outlook Addin so that I
can just activate the button click on the already opened Outlook ?
Please help !!