Description

Composes the letter use HTML file. With the help of MS Outlook(R) displays the letter, but doesn't send it.

Namespace:  DuoDimension.Databeam
Assembly:  Databeam.Word (in Databeam.Word.dll)
Version: 2.1.0.0

Syntax

      
 C#  Visual Basic 
public int OutlookMail(
	string FileName,
	string AddressTo,
	string Subject
)
Public Function OutlookMail ( _
	FileName As String, _
	AddressTo As String, _
	Subject As String _
) As Integer

Parameters

FileName
String
HTML file that will be transform into email.
AddressTo
String
The addres of recipient.
Subject
String
The theme of the letter.

Return Value

0 - Ok.

1 - Can't open the file. Check FileName parameter.

2 - MS Outlook(R) is not installed.

Examples

CopyC#
DuoDimension.Databeam.Word convert = new DuoDimension.Databeam.Word("*******");
if (convert.IsWordInstalled == true)
{
    convert.OpenDoc(@"D:\WordFile.doc");
    if (connvert.ReturnCode == 0)
    {
        convert.DocToHtml(@"d:\testmail.html");
        if (convert.ReturnCode == 0)
            convert.ComposeOutlookLetter(@"d:\testmail.html",
                "recipient@hotmail.com",
                "my test");
    }
}
CopyVB.NET
Dim convert As New DuoDimension.Databeam.Word("*******")
If convert.IsWordInstalled = True Then
    convert.OpenDoc("D:\WordFile.doc")
    If convert.ReturnCode = 0 Then
        convert.DocToHtml("d:\testmail.html")
        If convert.ReturnCode == 0 Then
            convert.ComposeOutlookLetter("d:\testmail.html",
                "recipient@hotmail.com",
                "my test")
        End If
    End If
End If

See Also