Click here to Skip to main content
11,478,174 members (70,592 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: C#
For Word 2007 automation the following code makes the winword app invisible.
 WordApp.Visible = false;
But when i'm using the same logic for Excel 2007 to hide the app, the property
 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.

Sayan Bera
Posted 21-Feb-13 2:59am
Edited 24-Feb-13 22:57pm

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

The Visible property of an Excel Application is a bool not a string.
You should use
Sayan Bera at 22-Feb-13 1:28am
Sorry for that, it is a printing mistake, in code I am using App.Visible = false;
CHill60 at 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 at 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)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 219
1 F-ES Sitecore 170
2 Sascha Lefèvre 170
3 Frankie-C 110
4 OriginalGriff 95
0 Sergey Alexandrovich Kryukov 7,675
1 OriginalGriff 7,321
2 Sascha Lefèvre 3,034
3 Maciej Los 2,491
4 Richard Deeming 2,325

Advertise | Privacy | Mobile
Web04 | 2.8.150520.1 | Last Updated 25 Feb 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100