Edraw Office Viewer Component
Home | Screenshots | Downloads | Order | Help | Support

Edraw Office Viewer Component Online Help

Properties

Show/Hide Toolbars

Property: boolean Toolbars;

Description: Shows/Hides the toolbars.

The property allow the developer to show or hide the toolbars in the office program.

<script language="vbscript">

Sub ToggleTitlebar()      

If OfficeViewer1.Toolbars = False Then

       OfficeViewer1.Toolbars = True

Else

       OfficeViewer1.Toolbars = False

End If

End Sub

</script>

You can hide the toolbar when you play the slide show too.

<script language="vbscript">

Sub PalySlideInSameWindows()     

OfficeViewer1.Open “c:\testfile.ppt”

OfficeViewer1. PlaySlideShow True

OfficeViewer1.Toolbars = False

End Sub

</script>

 

Show/Hide Titlebar

Property: boolean Titlebar;

Description: Shows/Hides the titlebar.

The method allow the developer to show or hide the titlebar in the top of the component.

<script language="vbscript">

Sub ToggleTitlebar()      

If OfficeViewer1.Titlebar = False Then

       OfficeViewer1. Titlebar = True

Else

       OfficeViewer1. Titlebar = False

End If

End Sub

</script>

In the titlebar there is a icon in the left. Click it you can find a menubar. 

 

Show/Hide Menubars

Property: boolean Menubar;

Description: Shows/Hides the Menubar.

The property allows the developer to show or hide the menubar. The menubar will display when you click the icon in the titlebar too.

<script language="vbscript">

Sub ToggleTitlebar()      

If OfficeViewer1. Menubar = False Then

       OfficeViewer1. Menubar = True

Else

       OfficeViewer1. Menubar = False

End If

End Sub

</script>

 

Modify the Caption

Property: BSTR Caption;

Description: Set the caption of the titlebar.

The property allows the developer to modify the caption in the titlebar.

<object classid="clsid:053AFEBA-D968-435F-B557-19FF76372B1B" id="EDrawOfficeViewer1" width="657" height="452">

       <param name="Caption" value="EDraw Office Viewer Component">

</object>

 

Is Dirty

Function: HRESULT IsDirty([out,retval] VARIANT_BOOL* pbool);

Description: Returns True/False if file has been altered or needs save.

 

<script language="vbscript">

Sub TestProperty()

       If OfficeViewer1.IsDirty = True Then

              MsgBox “The document has been modified.”

       Else

              MsgBox “The document hasn’t been modified.”

       End If

End Sub

</script>

 

 Is Opened

Function: HRESULT IsOpened([out,retval] VARIANT_BOOL* pbool);

Description: Returns True/Fase if file has been opened.

 

<script language="vbscript">

Sub TestProperty()

       If OfficeViewer1. IsOpened = True Then

              OfficeViewer1.Close

       End If

End Sub

</script>

 

 

 Is ReadOnly

Function: HRESULT IsReadOnly([out,retval] VARIANT_BOOL* pbool);

Description: Returns True/Fase if the opened file is read only.

 

<script language="vbscript">

Sub TestProperty()

       If OfficeViewer1. IsReadOnly Then

              MsgBox "We can't save the document at the opened location."

       End If

End Sub

</script>

 

Document Full Name

Function: HRESULT DocumentFullName([out,retval] BSTR* pbstr);

Description: Returns full document path name for object.

 

<script language="vbscript">

Sub SaveDoc()

       Dim sPath As String

       sPath = OfficeViewer1. DocumentFullName

       If sPath.Length != 0 Then

            OfficeViewer1.Save OfficeViewer1. DocumentFullName             

       Else

            MsgBox "We can't save the document at the empty path."

       End If

End Sub

</script>

 

 

Document Name

Function: HRESULT DocumentName([out,retval] BSTR* pbstr);

Description: Returns just the document name (excluding path).

 

Modify the Border Style

Property: short BorderStyle;

Description: Set the caption of the titlebar.

The property allows the developer to modify the border style. It can be the follow value:

typedef enum BorderStyle

       {

              BorderNone = 0,

              BorderFlat,

              Border3D,

              Border3DThin

       } BorderStyle;

<object classid="clsid:053AFEBA-D968-435F-B557-19FF76372B1B" id="EDrawOfficeViewer1" width="657" height="452">

       <param name="BorderStyle" value="2">

</object>

 

Set the Color Scheme

Properties:

OLE_COLOR BorderColor;

OLE_COLOR BackColor;

OLE_COLOR ForeColor;

COLOR TitlebarColor;

OLE_COLOR TitlebarTextColor;

Description: Set the color scheme for the component.

<object classid="clsid:053AFEBA-D968-435F-B557-19FF76372B1B" id="EDrawOfficeViewer1" width="657" height="452">

       <param name="BorderColor" value="-2147483632">

       <param name="BackColor" value="-2147483643">

       <param name="ForeColor" value="-2147483640">

       <param name="TitlebarColor" value="-2147483635">

       <param name="TitlebarTextColor" value="-2147483634">

</object>

 

Localize the File Menubars

Properties:

BSTR FileMenu;

BSTR FileMenu_New;

BSTR FileMenu_Open;

BSTR FileMenu_Close;

BSTR FileMenu_Save;

BSTR FileMenu_SaveAs;

BSTR FileMenu_PageSetup;

BSTR FileMenu_PrintPreview;

BSTR FileMenu_Print;

BSTR FileMenu_Properties;

Description: Set the caption of file menu.

The component allows the developer to localize the file menubars by setting the above properties.

<object classid="clsid:053AFEBA-D968-435F-B557-19FF76372B1B" id="EDrawOfficeViewer1" width="657" height="452">

       <param name="FileMenu" value="&amp;File">

       <param name=" FileMenu_New" value="&amp;New...   Ctrl+N ">

       <param name=" FileMenu_Open" value="&amp;Open... Ctrl+O ">

       <param name=" FileMenu_Close" value="&amp;Close ">

<param name=""FileMenu_Save" value="&amp;Save     Ctrl+S ">

       <param name=" FileMenu_SaveAs" value=" Save &amp;As...">

       <param name=" FileMenu_PageSetup" value=" Page Set&amp;up...">

       <param name=" FileMenu_PrintPreview" value=" Print Pre&amp;view ">

<param name=" FileMenu_Print" value="&amp;Print...">

       <param name=" FileMenu_Properties" value=" Propert&amp;ies ">

       <param name=" FileMenu_ExitPrintPreview" value=" E&amp;xit PrintPreview ">

</object>

 

 

(c) Copyright 2004-2007 PowerPoint OCX. All rights reserved.