COM Library Question

  • Thread starter Thread starter Steve
  • Start date Start date
S

Steve

MS-VS
C#

I've added System, Microsoft.Office.Core and PowerPoint
Object Libraries to my project. I can see them
under "References" however with the libraries loaded:

PowerPoint.Application pptApp = new PowerPoint.Application
();

//This DOES NOT cause compiler error
pptApp.Visible =
Microsoft.Office.Core.MsoTriState.msoFalse;

//This DOES cause compiler error
pptApp.Visible = MsoTriState.msoFalse;

I tried deleting the references and recreating them again,
no luck. Why?

Steve
 
-----Original Message-----
Add this line at the top of your code:

using Microsoft.Office.Core;


Thank You and that will work but the question is why do I
have to add it at all if I've added Microsoft.Office.Core
it to the VS environment references. I just wonder if
something else is wrong....
 
It just that I added Word, Excel, PowerPoint Com libraries to create
objects (i.e. Word.Open(...)), yet I don't have to state using Word,
using Excel, using PowerPoint.

Anyways, thank you - steve
 
Back
Top