Namespace Problems

Results 1 to 2 of 2

Thread: Namespace Problems

  1. #1
    Join Date
    Dec 1969

    Default Namespace Problems

    I&#039;m trying to do some MS Word stuff through ASP .Net, but I am getting a namespace error on the &#039;missing&#039; keyword in the following code:<BR><BR>using System;<BR>using System.Collections;<BR>using System.ComponentModel;<BR>using System.Data;<BR>using System.Drawing;<BR>using System.Web;<BR>using System.Web.SessionState;<BR>using System.Web.UI;<BR>using System.Web.UI.WebControls;<BR>using System.Web.UI.HtmlControls;<BR><BR>namespace Interop <BR>{<BR> public class wordtest : System.Web.UI.Page<BR> {<BR> <BR> private void Page_Load(object sender, System.EventArgs e)<BR> {<BR> Word.ApplicationClass oWordApp = new Word.ApplicationClass();<BR><BR> Word.Document oWordDoc = oWordApp.Documents.Add(ref missing, <BR> ref missing, ref missing, ref missing);<BR><BR> oWordDoc.Activate();<BR><BR> oWordApp.Selection.TypeText("This is the text");<BR> oWordApp.Selection.TypeParagraph();<BR> oWordDoc.SaveAs("c:\myfile.doc");<BR><BR> oWordApp.Application.Quit(ref missing, ref missing, ref missing);<BR> }<BR><BR> #region Web Form Designer generated code<BR> override protected void OnInit(EventArgs e)<BR> {<BR> //<BR> // CODEGEN: This call is required by the ASP.NET Web Form Designer.<BR> //<BR> InitializeComponent();<BR> base.OnInit(e);<BR> }<BR> #endregion<BR> }<BR>}<BR><BR>Help please!!! Thanks.

  2. #2
    Join Date
    Dec 1969

    Default do you have documentation

    on using the word component? not that it matters, there is no definition of the object "missing" anywhere. what are those functions expecting as input?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts