http://lmgtfy.com/?q=VSTO

On Tue, Sep 22, 2009 at 10:34 PM, Ranjith <[email protected]> wrote:

>
>
>
> And i like to say one more thing .
> I am a very beginner in .NET.
> And i didn't get what is VSTO.
> But i fixed the problem with your suggestion, thanks.
> Here is my code and i think it is not complete.
>
> using System;
> using System.Collections.Generic;
> using System.ComponentModel;
> using System.Data;
> using System.Drawing;
> using System.Linq;
> using System.Text;
> using System.Windows.Forms;
> using Word = Microsoft.Office.Interop.Word;
> using System.Reflection;
>
> namespace testing
> {
>    public partial class Form1 : Form
>    {
>        public Form1()
>        {
>            InitializeComponent();
>        }
>
>        private void button1_Click(object sender, EventArgs e)
>        {
>            object fileName = "D:\\MyWord.doc";
>            object novalue = System.Reflection.Missing.Value;
>
>            Word.ApplicationClass objWord = new Word.ApplicationClass
> ();
>            Word.Document objWordDoc = objWord.Documents.Add(ref
> novalue, ref novalue, ref novalue, ref novalue);
>
>            objWordDoc.Activate();
>            objWord.Selection.Font.Bold =1;
>            objWord.Selection.Font.Size = 16;
>            objWord.Selection.TypeText(".NET Rocks!!!");
>            objWord.Selection.TypeParagraph();
>            objWord.Selection.TypeText("Savage loves .NET");
>            //objWord.Selection.
>
>            //objWordDoc.SaveAs(ref fileName, ref novalue, ref
> novalue, ref novalue,
>            //            ref novalue, ref novalue, ref novalue, ref
> novalue, ref novalue,
>            //            ref novalue, ref novalue);
>
>            objWord.Quit(ref novalue, ref novalue, ref novalue);
>
>        }
>    }
> }
>
> Any way it is working.
> Can you please say if there are something that can be made perfect in
> this.
> And it will be great help if you are saying what is VSTO ?
> Thank You.
>

Reply via email to