Hi, I would like to create new mail which is reply to existing mail; I'm doing something like this: Outlook.MailItem newMail = (Outlook.MailItem)mailItem.Application.CreateItem(Outlook.OlItemType.olMailItem); newMail = mailItem.Reply(); I would like to eliminate the automatic signature that is added to the replyed message. Can it be done? Thanks, Lior
For that you'd need to know what the signature is and search in the Body and/or HTMLBody for that text. You could create a new email that you don't display to get the signature (assuming it's the same for new mails and replies) and use that as the seed for your search. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Professional Programming Outlook 2007. Reminder Manager, Extended Reminders, Attachment Options. http://www.slovaktech.com/products.htm "Lior schwimmer" wrote in message news:37d1bf15-85ce-4194-8532-4bfcbd8aa297@z72g2000hsb.googlegroups.com... > Hi, > > I would like to create new mail which is reply to existing mail; > I'm doing something like this: > > Outlook.MailItem newMail = > (Outlook.MailItem)mailItem.Application.CreateItem(Outlook.OlItemType.olMailItem); > newMail = mailItem.Reply(); > > I would like to eliminate the automatic signature that is added to the > replyed message. > Can it be done? > > Thanks, > Lior
When I create new mail item: Outlook.MailItem newMail = (Outlook.MailItem)mailItem.Application.CreateItem(Outlook.OlItemType.olMailItem); and look into newMail.HTMLBody I can not see the siganature as part of the body: "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 3.2//EN\">\r\n<HTML>\r \n<HEAD>\r\n<META NAME=\"Generator\" CONTENT=\"MS Exchange Server version 6.5.7036.0\">\r\n<TITLE></TITLE>\r\n</HEAD>\r\n<BODY>\r\n<!-- Converted from text/plain format -->\r\n\r\n</BODY>\r\n</HTML>"
Please post part of the preceding message in the thread so the thread is easier to follow. Is the new message an HTML message? If not why are you looking at HTMLBody? You'd read the signature from Body in that case. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Professional Programming Outlook 2007. Reminder Manager, Extended Reminders, Attachment Options. http://www.slovaktech.com/products.htm "Lior schwimmer" wrote in message news:9091e1fa-436b-4704-9dec-0f01492825fd@w7g2000hsa.googlegroups.com... > When I create new mail item: > Outlook.MailItem newMail = > (Outlook.MailItem)mailItem.Application.CreateItem(Outlook.OlItemType.olMailItem); > > and look into newMail.HTMLBody I can not see the siganature as part of > the body: > > "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 3.2//EN\">\r\n<HTML>\r > \n<HEAD>\r\n<META NAME=\"Generator\" CONTENT=\"MS Exchange Server > version 6.5.7036.0\">\r\n<TITLE></TITLE>\r\n</HEAD>\r\n<BODY>\r\n<!-- > Converted from text/plain format -->\r\n\r\n</BODY>\r\n</HTML>"
On Jul 28, 5:21 pm, "Ken Slovak - [MVP - Outlook]" wrote: > Please post part of the preceding message in the thread so the thread is > easier to follow. > > Is the new message an HTML message? If not why are you looking at HTMLBody? > You'd read the signature from Body in that case. > > -- > Ken Slovak > [MVP - Outlook]http://www.slovaktech.com > Author: Professional Programming Outlook 2007. > Reminder Manager, Extended Reminders, Attachment Options.http://www.slovaktech.com/products.htm > > "Lior schwimmer" wrote in message > > news:9091e1fa-436b-4704-9dec-0f01492825fd@w7g2000hsa.googlegroups.com... > > > > > When I create new mail item: > > Outlook.MailItem newMail = > > (Outlook.MailItem)mailItem.Application.CreateItem(Outlook.OlItemType.olMailItem); > > > and look into newMail.HTMLBody I can not see the siganature as part of > > the body: > > > "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 3.2//EN\">\r\n<HTML>\r > > \n<HEAD>\r\n<META NAME=\"Generator\" CONTENT=\"MS Exchange Server > > version 6.5.7036.0\">\r\n<TITLE></TITLE>\r\n</HEAD>\r\n<BODY>\r\n<!-- > > Converted from text/plain format -->\r\n\r\n</BODY>\r\n</HTML>"- Hide quoted text - > > - Show quoted text - Hi, When I looking into newMail.Body It is null
Then something is very strange. Can you get other properties of the newMail item such as Subject? What about if you save newMail before trying to get at Body or HTMLBody? -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Professional Programming Outlook 2007. Reminder Manager, Extended Reminders, Attachment Options. http://www.slovaktech.com/products.htm "Lior schwimmer" wrote in message news:45e2fca1-dde0-4e06-9a11-44f055b05581@c65g2000hsa.googlegroups.com... <snip> Hi, When I looking into newMail.Body It is null