Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > Beginning VB 6
|
Beginning VB 6 For coders who are new to Visual Basic, working in VB version 6 (not .NET).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning VB 6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 11th, 2006, 07:32 AM
Registered User
 
Join Date: Dec 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Sheikh Abdul Jaweed Send a message via Yahoo to Sheikh Abdul Jaweed
Default open a Ms Word Application from browser

Hi Dear,

I need to open a Ms Word Application from browser separately, which is working fine, but the problem is, it is opening in a minimize mode. I need it to be open in maximize mode with control/focus in it.
Below is my code.

    sub displayRTFDoc(rtfUrl)
        Dim oWordApp
        Set oWordApp = CreateObject("Word.Application")
        oWordApp.Visible = True
        oWordApp.Documents.Open(rtfUrl)
        oWordApp.Documents(1).Activate
        Set oWordApp = Nothing
    end sub

thanks
Jaweed


 
Old December 15th, 2006, 02:19 PM
Friend of Wrox
 
Join Date: Nov 2004
Posts: 1,621
Thanks: 1
Thanked 3 Times in 3 Posts
Default

Isn't there a .Maximize method?
Code:
    sub displayRTFDoc(rtfUrl)
        Dim oWordApp
        Set oWordApp = CreateObject("Word.Application")
        oWordApp.Visible = True
        oWordApp.Maximize
        oWordApp.Documents.Open(rtfUrl)
        oWordApp.Documents(1).Activate
        Set oWordApp = Nothing
    end sub
    I'm not positive. It just seems to me that I remember that there is.

When I record a macro in Word, it creates
Code:
    Application.WindowState = wdWindowStateMaximize
So maybe what you need to use is:
Code:
        oWordApp.WindowState = wdWindowStateMaximize ' (The value of the const is 1...)





Similar Threads
Thread Thread Starter Forum Replies Last Post
open Ms Word Application on IE Sheikh Abdul Jaweed Javascript 0 December 11th, 2006 06:39 AM
script to open db to ms word? weedee Classic ASP Databases 5 June 2nd, 2005 04:40 PM
How to open a .DOC file with MS-Word ? sherbir Servlets 0 July 26th, 2004 02:39 AM
Heighlet Specific Word when open file in a browser salman Classic ASP Databases 1 March 30th, 2004 06:30 AM
How to open MS Word or PDF files? kaz VS.NET 2002/2003 0 December 18th, 2003 05:41 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.