How can I open and modify MS word file in .NET application?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • tc

    How can I open and modify MS word file in .NET application?

    I would like to create an application that can modify the content and
    style(e.g. font size, font, style) in a MS Word document. Can anyone give me
    some idea/reference?

    thanks


  • Nicholas Paldino [.NET/C# MVP]

    #2
    Re: How can I open and modify MS word file in .NET application?

    tc,

    You will want to add a reference to the Microsoft Office library as well
    as the Microsoft Word Object library (under the COM tab when you add
    references). Once you do that, you will be able to access Word using COM
    interop and then load and modify your document.

    Hope this helps.


    --
    - Nicholas Paldino [.NET/C# MVP]
    - mvp@spam.guard. caspershouse.co m

    "tc" <ywchan@hkem.co m> wrote in message
    news:%23i1IIy6p DHA.2772@TK2MSF TNGP12.phx.gbl. ..[color=blue]
    > I would like to create an application that can modify the content and
    > style(e.g. font size, font, style) in a MS Word document. Can anyone give[/color]
    me[color=blue]
    > some idea/reference?
    >
    > thanks
    >
    >[/color]


    Comment

    • Bill.NET

      #3
      Re: How can I open and modify MS word file in .NET application?

      Is this available for all Office family (Excel, PowerPoint,...) and versions
      (2000, XP, 2003)...?

      Thanks,
      Bill


      "Nicholas Paldino [.NET/C# MVP]" <mvp@spam.guard .caspershouse.c om> wrote in
      message news:%23yMOh06p DHA.2804@TK2MSF TNGP09.phx.gbl. ..[color=blue]
      > tc,
      >
      > You will want to add a reference to the Microsoft Office library as[/color]
      well[color=blue]
      > as the Microsoft Word Object library (under the COM tab when you add
      > references). Once you do that, you will be able to access Word using COM
      > interop and then load and modify your document.
      >
      > Hope this helps.
      >
      >
      > --
      > - Nicholas Paldino [.NET/C# MVP]
      > - mvp@spam.guard. caspershouse.co m
      >
      > "tc" <ywchan@hkem.co m> wrote in message
      > news:%23i1IIy6p DHA.2772@TK2MSF TNGP12.phx.gbl. ..[color=green]
      > > I would like to create an application that can modify the content and
      > > style(e.g. font size, font, style) in a MS Word document. Can anyone[/color][/color]
      give[color=blue]
      > me[color=green]
      > > some idea/reference?
      > >
      > > thanks
      > >
      > >[/color]
      >
      >[/color]


      Comment

      Working...