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
216 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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

Microsoft Office Picture Manager was included in Office 2003, 2007, and 2010, but not in Office 2013. Users had hopes that it would be in Office 2016/Office 365, but it is not. Fortunately, the same zero-cost technique that works to install it with …
This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
The viewer will learn how to simulate a series of sales calls dependent on a single skill level and learn how to simulate a series of sales calls dependent on two skill levels. Simulating Independent Sales Calls: Enter .75 into cell C2 – “skill leve…
Learn how to make your own table of contents in Microsoft Word using paragraph styles and the automatic table of contents tool. We'll be using the paragraph styles in Word’s Home toolbar to help you create a table of contents. Type out your initial …

778 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