Click here to Skip to main content
Rate this: bad
good
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.
 

 

 

 

Regards
Sayan Bera
Posted 21-Feb-13 1:59am
Edited 24-Feb-13 21:57pm
v4

1 solution

Rate this: bad
good
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
ExcelApp.Visible=false;
  Permalink  
Comments
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 OriginalGriff 410
1 Gihan Liyanage 338
2 ChauhanAjay 180
3 Vinay Mistry 160
4 Sergey Alexandrovich Kryukov 138
0 Sergey Alexandrovich Kryukov 9,011
1 OriginalGriff 7,941
2 CPallini 2,603
3 Richard MacCutchan 2,121
4 Abhinav S 1,928


Advertise | Privacy | Mobile
Web03 | 2.8.140827.1 | Last Updated 25 Feb 2013
Copyright © CodeProject, 1999-2014
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