Click here to Skip to main content
15,886,061 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
For Word 2007 automation the following code makes the winword app invisible.
C#
WordApp.Visible = false;

But when i'm using the same logic for Excel 2007 to hide the app, the property
C#
ExcelApp.Visible = false;
does not make it invisible.
Please suggest why this property is not being set to false/ some other way to work around.

VS -2008
.NET - 3.5
Office - 2007 are versions of tech used for working.
OS - Windows 8.








Regards
Sayan Bera
Posted
Updated 24-Feb-13 21:57pm
v4

1 solution

The Visible property of an Excel Application is a bool not a string.
You should use
C#
ExcelApp.Visible=false;
 
Share this answer
 
Comments
Sayan Bera 22-Feb-13 1:28am    
Sorry for that, it is a printing mistake, in code I am using App.Visible = false;
CHill60 22-Feb-13 5:11am    
Well that *should* work. However there is a "feature" of excel that if you manually open a spreadsheet then the invisible copy becomes visible - it's not something like that is it?
Sayan Bera 6-Mar-13 1:14am    
After a few testing over different OS, I found-
In Windows 7, initially it remains invisible but, after a while sometimes if I refresh(F5) on desktop it becomes visible.
In Windows XP also same as above.
But in Windows 8 it remains visible as soon as application launches.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900