Click here to Skip to main content
13,006,530 members (73,803 online)
Rate this:
Please Sign up or sign in to vote.
See more:
Hii friends,
I am currently working on office automation project using office 2010. I have one master excel file, from which i pick up data and opening word application and document object, put data for each field present on word document. So it makes number of word files for each record. While creating word files, it appears in desktop window. I have to hide it from being displaying. I also set application.visible=false; but it shows the window. so please give me correct solution to hide window.
Posted 22-Nov-12 3:33am

1 solution

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

Solution 1

Are you sure you set visible property of the word application? In the context of excel, application refers to excel itself.
Word.Application.Visible = false

Good luck!
Rahul Munde 23-Nov-12 2:37am
application in the current code is object of word application.
So, do u have any other idea?
E.F. Nijboer 23-Nov-12 9:29am
Okay, because you mention "I have one master excel file, from which i pick up data and opening word application and document object". Reading that, my idea was that your code is running from within excel and not word.
You can also try opening the word document hidden, using this:
Set doc = Word.Documents.Open(FileName:=DocFilename, Visible:=False)
Rahul Munde 26-Nov-12 1:38am
again this doesn't give solution. Thanks for help. I need other option.
E.F. Nijboer 26-Nov-12 3:21am
You can also try this:
oDoc.Windows(1).Visible = False
oDoc.ActiveWindow.Visible = False
Rahul Munde 26-Nov-12 4:31am
Problem not solved but good efforts. Thanks E.F. Nijboer.
E.F. Nijboer 26-Nov-12 7:03am
It is really strange all of those commands don't work. It looks like something is preventing them from hiding. Like a setting that prevents it to change its visibility. Good luck finding a solution!

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170628.1 | Last Updated 22 Nov 2012
Copyright © CodeProject, 1999-2017
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