Setting Properties

activex

Boolean Property

The Visible property of  the Word application controls whether the Word window is visible. Use the Features Help (F2) to see what type of value this property accepts.

If you want more detailed information, press F1 to open the help for this property. The help is displayed only if Visual Basic Help was included in your Word or Office installation.

Make the Show/Hide Word button toggle the Visible property on or off:

EVTROUTINE HANDLING(#ShowHideBtn.Click)

if cond('#wordapp.visible *eq True')

  SET #WordApp Visible(false)

else

  SET #WordApp Visible(true)

endif

ENDROUTINE

Enumeration Property

To let the user set the size of the Word window, use the WindowState property of the application. The Features help for the WindowState property shows that the value for this property must be of the type WdWindowState.

Double-click the WindowState property to see what values you can specify for it.

The property can have one of three constants (enumerations) as the value. Note that you must qualify the enumeration name by the type library name VA_WORD. Three radio buttons were used for setting the window state:

EVTROUTINE HANDLING(#RDBN_1.Click)

IF COND('#rdbn_1.buttonchecked *eq true')

SET #WordApp Windowstate(VA_WORD.wdWindowStateMinimize)

endif

ENDROUTINE

EVTROUTINE HANDLING(#RDBN_2.Click)

if cond('#rDbn_2.buttonchecked *eq True')

SET #WordApp Windowstate(VA_WORD.wdWindowStateNormal)

endif

ENDROUTINE

EVTROUTINE HANDLING(#RDBN_3.Click)

if cond('#rdbn_3.buttonchecked *eq True')

SET #WordApp Windowstate(VA_WORD.wdWindowStateMaximize)

endif

ENDROUTINE