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
210 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)

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
OneDrive for Office 365 Users 2 42
Microsoft Access 2010 Question 2 39
Excel list clean up 6 44
Word 2010 mail merge 3 35
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…
No matter the version of Windows you are using, you may have some problems with Windows Search running too slow or possibly not running at all. Before jumping into how you can solve this issue, just know there are many other viable alternative deskt…
This video shows the viewer how to set up and create Footnotes in their document. Click on the References tab: Select "Insert Footnote": Type in desired text:
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…

705 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

15 Experts available now in Live!

Get 1:1 Help Now