Tag Archives: Word

Create a PowerPoint presentation from a Word document in C#

This example shows how you can create a PowerPoint presentation containing slides that correspond to selected styles in a Microsoft Word document. How to Use It Enter or select a Word document and a destination PowerPoint presentation. Enter the styles … Continue reading

Posted in interoperability, Office, Word | Tagged , , , , , , , , , , , , , , , | Leave a comment

Use Word to make a PDF containing pictures in C#

The example Make a Word document containing pictures in C# shows how to make a Word document containing pictures taken from selected files. This example is similar to the that one (see that post for details) except it saves the … Continue reading

Posted in files, graphics, interoperability, Office, Word | Tagged , , , , , , , , , , , , , , , , | Leave a comment

Make a Word document containing pictures in C#

Occasionally you may want to combine selected pictures to make a Word document. This example shows one way you can search for files matching a pattern and then add them to a new Word document. This is a fairly long … Continue reading

Posted in files, graphics, interoperability, Office, Word | Tagged , , , , , , , , , , , , , , | 3 Comments

Examine the unique words in a Microsoft Word file in C#

This example is a modification of the earlier post List the unique words in a Microsoft Word file in C#. That program reads the words in a Microsoft word file, sorts them, and then displays the unique words in a … Continue reading

Posted in files, Office, strings, Word | Tagged , , , , , , , , , , , , , | Leave a comment

Convert RTF and TXT files into DOCX files in C#

First add a reference to Microsoft.Office.Interop.Word. To make using the library easier, add this using statement: using Word = Microsoft.Office.Interop.Word; When you enter the input and output file names and click Convert, the program uses the following code to open … Continue reading

Posted in files, interoperability, Office, Word | Tagged , , , , , , , , , , , , , | Leave a comment

Convert doc files into docx files in C#

This example shows how to write a C# program to automatically convert doc files into docx files. In a previous version of Windows, whenever I double-clicked a .doc file, I got this error message: Error The operating system is not … Continue reading

Posted in Office, Word | Tagged , , , , , , , , , , , , | Leave a comment

List the unique words in a Microsoft Word file in C#

The example List unique words in a text file in C# shows how to list the unique the words in a text file. This example shows how to list the unique words in a Microsoft Word file. Before you start, … Continue reading

Posted in files, Office, strings, Word | Tagged , , , , , , , , , , , , | 1 Comment

Remove the hyperlinks from a Word document in C#

This example shows how you can remove the hyperlinks from a Word document. When you select text on a web page and paste it into a Word document, the result often contains hyperlinks that you don’t want. (Actually after you … Continue reading

Posted in files, Office, Word | Tagged , , , , , , , , , , , | Leave a comment

Add a picture to a Word document in C#

This example shows how a C# program can add a picture to a Word document. It also shows how to use a bookmark to find the beginning of the Word document, make text flow around the picture, and align the … Continue reading

Posted in interoperability, Office, Word | Tagged , , , , , , , , , , , , , , , | 2 Comments

Create a Word document in C#

This example shows how to make a C# program create a Word document. First open the Add References dialog. On the COM tab, select “Microsoft Word 14.0 Object Library” (or whatever version you have installed on your system). Add the … Continue reading

Posted in interoperability, Office, Word | Tagged , , , , , , , , , , , , | 4 Comments