Solved

word (office 2010) coming up minimised when called from another program on windows 7 but not on xp

Posted on 2013-12-09
4
214 Views
Last Modified: 2014-01-20
Hi

I have a curious problem, Word 2010 when called from a vb6  program using create object is being displayed minimised, even though explicitly in the program it set to maximised.

When the Word 2003 is called from the VB6 program on Windows XP using create object Word correctly comes up maximised.

Whats the problem on Windows 7!
0
Comment
Question by:capitaldev
  • 2
  • 2
4 Comments
 
LVL 41

Expert Comment

by:pcelba
ID: 39705851
Word 2003 and 2010 are two rather different programs... with rather different behaviour.

How do you recognize the Word is minimized? Isn't it just placed behind other windows? What happens when you set WindowState = 2 and then WindowState = 1 ?

Could you post some piece of code?
0
 

Author Comment

by:capitaldev
ID: 39706054
Its sits on the task bar flashing.




The code we use is

Set mvarApp = CreateObject("Word.Application")
mvarApp.WindowState = 2


Tried WindowState =2,  AND windowState = 1 both seem to be minimised.

However a collegue of mind thinks that the word documents are behind the program running.

Is there a way to get word to always display on top of the program running.
0
 
LVL 41

Accepted Solution

by:
pcelba earned 500 total points
ID: 39706092
This code should work:

Set mvarApp = CreateObject("Word.Application")
mvarApp.Visible = True    ...   Hope this is right VB syntax
mvarApp.WindowState = 2
mvarApp.WindowState = 1
0
 

Author Closing Comment

by:capitaldev
ID: 39793807
Thanks for the answer. Sorry it took so long to get back to you.  Also found a way of doing it without altering the code namely A registy hack i.e

In the HKEY_Current_User hive, then the Control Panel section followed by the Desktop sub section

Then edit the value of the key ForegroundLockTimeout from 30d40 to 0.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As with any other System Center product, the installation for the Authoring Tool can be quite a pain sometimes. This article serves to help you avoid making these mistakes and hopefully save you a ton of time on troubleshooting :)  Step 1: Make sur…
Article by: Leon
Software Metering within our group of companies has always been an afterthought until auditing of software and licensing became a pain point. Orchestrator and SCCM metering gave us the answer and it was an exciting process.
This video walks the viewer through the process of creating Hyperlinks for the web and other documents. Select the "Insert" tab: Click "Hyperlink":  Type "http://" followed by a web address to reference a website or navigate to a document to ref…
Learn how to create and modify your own paragraph styles in Microsoft Word. This can be helpful when wanting to make consistently referenced styles throughout a document or template.

930 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now