Getting Started

In order to use Databeam Word .Net in your application, you must first add a reference to it:
   1. In Solution Explorer (VisualStudio.Net) , expand the project node you want to add a reference to.
   2. Right-click the References node for the project and select Add Reference from the shortcut menu:

   Add reference

   3. Locate the component using the Browse button.
   4. The component you referenced appears in the SelectedComponents pane of the dialog box:

   Add component

   5. Click OK when you have added reference to the component.

CopyC# example
 1using System;
 2
 3namespace Project1
 4{
 5    public class Class1
 6    {
 7        static void Main()
 8        {
 9            Console.Write("Converting DOC to HTML: \n");
10            DuoDimension.Databeam.Word conv = new DuoDimension.Databeam.Word("");
11            if (conv.IsWordInstalled)
12            {
13                if (conv.OpenDoc(@"d:\test.doc") == 0)
14                {
15                    int ret = conv.DocToHtml(@"d:\test.html");
16                    switch (ret)
17                    {
18                        case 0: 
19                        {
20                            conv.OutlookMail(@"d:\test.html", "jwood@hotmail.com", "Advance info");
21                            Console.Write("...Ok.");
22                            break;
23                        }
24                        case 1: Console.Write("...error: can't save the resulting file."); break;
25                    }
26                }
27                else
28                {
29                    Console.Write("...error: can't open file.");
30                }
31            }
32        }
33    }
34}

 

CopyVB.NET example
 1Module Module1
 2    Sub Main()
 3        Console.Write("Converting DOC to HTML: \n")
 4        Dim conv As New DuoDimension.Databeam.Word("")
 5
 6        If conv.IsWordInstalled = True Then
 7            If conv.OpenDoc("d:\test.doc") = 0 Then
 8                Dim ret = conv.DocToHtml("d:\test.html")
 9                Select Case ret
10                    Case 0
11                        conv.OutlookMail("d:\test.html", "jwood@hotmail.com", "Advance info")
12                        Console.Write("...Ok.")
13                    Case 2
14                        Console.Write("...error: can't save the destination file.")
15                End Select
16            Else
17                Console.Write("...error: can't open file.")
18            End If
19        End If
20    End Sub
21End Module