Resize Office Viewer Component in VB, C#, Delphi, ASP.NET

Edraw Office Viewer Component allows developers to resize the component in runtime.

Download Office Viewer Component and View Sample Projects

The Width and Height properties are not the properties of the component. So you can't call the EDOffice1.Width or EDOffice1.Height.

Set the Component Size in HTML or ASP.NET

Use the office OCX as the Object in the html code. Then put it in a table tag.

For Example:

<object classid="clsid:7677E74E-5831-4C9E-A2DD-9B1EF9DF2DB4" id="OA1" width="100%" height="100%" codebase="https://www.edrawsoft.com/download/officeviewer.cab#7,5,0,356">
<param name="Toolbars" value="1">
<param name="LicenseName" value="30daytrial">
<param name="LicenseCode" value="EDWD-3333-2222-1111">
<param name="BorderColor" value="15647136">
<param name="BorderStyle" value="2">
</object>

Change the Size in the VC Project

You can put the component in a form or a dialog. Then set the ChipChildren property for the form or dialog. In the OnSize method, you can call the SetComponentSize method to change the width or height.

Change the Size in the c#, VB or Delphi

Only need to call the SetcomponentSize method when the parent window change the size.

Disables Office 2003 Toolbars

Disable Office Ribbon Button

Show/Hide Office Menu Bar

Get Started! Make your application display and interact with MS Office. Try Office Viewer Component
Top