Skip to main content

One post tagged with "MS Office"

View All Tags

· 4 min read
Adnan Rafiq

MS Office Interop Automation in C#

Problem Statement: For instance, online training web site asked students to submit their assignments for Microsoft Office Access.  The Project involves performing many tasks in MS Access. and evaluating projects manually will be impossible for site with thousands of concurrent users. So, it will require automation for instant feedback and accurate grading; right?

How to automate: We have to create & release instance of MS Access Application object. However, it can be achieved in two ways:

  1. Add reference to Office Interop dll's as shown in below code snippet.
  2. Late Bind, use Type.GetTypeFromProgID("Access.Application") to get type, rest of the code stays same.