Minimizing the word document does not work.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have wrritten a OCX component in VB. The VB code creates a WORD Application
then it minimizes the word application and kicks of the word spell check
feature. The problem si the word document does not get minizmed and stays on
the screen. I dont want to see the word doument on screen it should jsut
appear on the taskvbar at bottm and hence I have minimized it. Is there a
soultion for this?

CODE
Set myDoc = CreateObject("Word.Application")
myDoc.Application.Visible = True // this is true as I want to show
windows in taskbar
myDoc.Application.WindowState = vbMinimizedFocus // want to minimize window
myOldText = parentWinArg.All.returnmsg.Value
Set myWorkDoc = myDoc.Documents.Add
myWorkDoc.Content = myOldText
myWorkDoc.Activate
myWorkDoc.ActiveWindow.Caption = "eWISACWIS SpellCheck"
myWorkDoc.CheckSpelling
 
Hi Sach

Sach wrote:
[..]
Set myDoc = CreateObject("Word.Application")
myDoc.Application.Visible = True // this is true as I want to show
windows in taskbar
myDoc.Application.WindowState = vbMinimizedFocus // want to minimize window
myOldText = parentWinArg.All.returnmsg.Value
Set myWorkDoc = myDoc.Documents.Add
myWorkDoc.Content = myOldText
myWorkDoc.Activate
myWorkDoc.ActiveWindow.Caption = "eWISACWIS SpellCheck"
myWorkDoc.CheckSpelling

Not sure what group is good for VB, but you're sure better off to repost
this in a vba group (esp. since you haven't received an answer in here
so far).

HTH
Robert
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top