Tag Archives: Office

Make a Word document with one picture on each page in C#

This example shows how you can make a program create a Word document that contains a picture on each page. Before you start writing code, open the Add References dialog, click on the COM tab, and add a reference to … Continue reading

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

List strings with a particular style in a Microsoft Word document in C#

I’m writing a new book and the development editor wants me to make a list of key terms that I specifically want included in the index. I want to include all of the words marked with the style KeyTerm, so … Continue reading

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

Make a Word document with multiple pages in C#

The example Create a Word document in C# shows how to create a Word document and save it into a file. See that example for the basics including how to create the document, add paragraphs to it, and save it … Continue reading

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

Use a password protected Access database in C#

This example shows how you can open and use a password protected Access database in C#. It also shows how you can use the database’s password protection to provide a login form for your program. Note that the security used … Continue reading

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

Use VBA macros to add hyperlinks to external files

My book Essential Algorithms: A Practical Approach to Computer Algorithms has associated instructor materials that include lesson plans and PowerPoint presentations that are accessible via hyperlinks. The materials include a summary Excel workbook that contains hyperlinks that let you open … Continue reading

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

Use VBA to randomize cells in Excel

This is quick excursion into Excel VBA programming. This example uses a VBA macro to let you randomize the selected cells in an Excel workbook. If you select a contiguous block of cells and click the Randomize button, the following … Continue reading

Posted in Excel, Office, VBA | Tagged , , , , , , , , , , , , , | Leave a comment

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 , , , , , , , , , , , , , , | 6 Comments

Save Excel data in a PDF file in C#

This example extends the example Write Excel data in C#. See that example for information on how to open an Excel workbook, write data into it, and save it. Note that before you can use the Excel interop library, you … Continue reading

Posted in Excel, Office | Tagged , , , , , , , , , , | 5 Comments