Outlook outlook = new Outlook();
try
{
OutlookItem item = outlook.createItemFromTemplate(new File("test.msg"));
if(item != null)
{
if(item.getType().isMail())
{
OutlookMail mail = (OutlookMail) item;
String mailBody = mail.getBody();
}
item.display();
}
}
finally
{
outlook.dispose();
}
API Reference
| Classic JavaDoc |
Outlook.createItemFromTemplate
public OutlookItem createItemFromTemplate(java.io.File templateFile)
public OutlookItem createItemFromTemplate(java.io.File templateFile, OutlookFolder destinationFolder)
Creates an OutlookItem object from the specified .msg file.
public OutlookItem createItemFromTemplate(java.io.File templateFile, OutlookFolder destinationFolder)
Creates an OutlookItem object from the specified .msg file and places that item in the
specified destination folder.
Community comments
Powered by JavaDocPlus