Category Archives: Office

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 , , , , , , , , , , , , , , | 3 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 , , , , , , , , , , | 2 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

Save several images into Access in C#

The example Save images in an Access database in C# includes an Access database. Unfortunately if you save several images into the database and then open the database in Access, Access removes the images. It just doesn’t seem to understand … Continue reading

Posted in database, graphics, image processing, Office | Tagged , , , , , , , , , , , , , , , , , , | 1 Comment

Load images from an Access database in C#

The post Save images in an Access database in C# explains how to save images in an Access database. This post explains how to load images from an Access display them. Like previous examples, this program uses a SQL statement … Continue reading

Posted in database, graphics, image processing, Office | Tagged , , , , , , , , , , , , , , , , , | 2 Comments