EDraw Office Viewer Component 5.3 Released

EDraw Office Viewer Component

Download link: http://www.ocxt.com/download/OfficeOCXSetup.exe

Online Demo: http://www.ocxt.com/online-demo

You can find the sample projects and help document in the install folder.

5.3.407.1 version is a maintenance update.

1. Provided the silent print for the MS office document.

2. Added WordGetCurrentPageIndex and WordGetTotalPageCounts to return the current page number and page counts in Word document. 

3. The ExcelGetCellValue won’t returns null when the date is numeric;

4. Supported to open an Office 2007 file from the remote server with the “Open” method directly.

5.3.288.1

1. Fixed the buffer overflow to execute arbitrary code via a long first argument to the HttpDownloadFileToTempDir method and FTPDownloadFile.

2. Solved the failture when saving an Excel document to the server and having a cell activated.

3. Removed the default overwrite reminder from Microsoft Excel if you save an open Excel file at the same position multiple times.

4. Solved: Return to the first page if you click the Document Map in a protected Microsoft Word document

5. Solved: The excel process keeps back when call the “OfficeProtectDocument” method.

6. Some other small improvements.

Javascript for Office Viewer Component

We have written a demo page with javascript. Anybody can visit it at

http://www.ocxt.com/oademo_javascript.php

You can find all the sample projects in the install directory.

What’s New in Version 5.2

1. Solves the crash if you apply the “SaveToServer”  methods in Internet explore.

Now you can call the follow scripts to finish the SaveToServer.

Sub SavetoServer()
    If OA1.IsOpened = True Then
     document.body.style.cursor = “wait”
     OA1.HttpInit
     Dim strFileName
     strFileName = OA1.DocumentName
     If strFileName = “” Then
        strFileName = “yourguid”
        strFileName = strFileName + OA1.GetOpenedFileExt()
     End If
      OA1.HttpAddPostOpenedFile strFileName
      OA1.HttpPost “http://www.ocxt.com/demo/upload_weboffice.php
      document.body.style.cursor = “default”
      Dim sPath
      On Error Resume Next
      sPath = “Save successfully! You can download it at http://www.ocxt.com/demo/” + strFileName
    MsgBox sPath
 Else
  MsgBox “Please open a document firstly!”
 End If
End Sub

2. Adds some new methods.

Function:  HRESULT GetTempFilePath([out,retval] BSTR* strValue);
Description: Gets a temporary file path.

Function:  HRESULT ClearTempFiles();
Description: Clears these temporary files created by the component. The function won’t delete any other files out of OA temporary directory.

Function:  HRESULT GetOpenedFileExt([out,retval] BSTR* strValue);
Description: Gets the file extend of the current opened file.

Function:  HRESULT GetOpenedFileType([out,retval] OpenedFileType* nType);
Description: Gets the file type of the current opened file.

3. Changes the Insecure Method “void HttpDownloadFile(WebUrl, LocalFile, WebUsername, WebPassword)” to “BSTR HttpDownloadFileToTempDir(WebUrl, WebUsername, VARIANT WebPassword);

Now the component can only download the file to “Internet temporary file directory\OA\”. So anybody can’t use the method to download a file then conver a good system file.

Host Microsoft Office Application in .NET

If you are building a .NET application and you are struggling to find a way to host Word documents, Excel spreadsheets, PowerPoint presentations, Visio drawings orProject files, you might consider using the Visual C++ ActiveX Control for hosting Office documents. I learned about this download resource and I was shocked to see how you can add it to your solution and start working with Office applications in less than a minute. You can open Office applications, format content, update documents, save changes, print, and more inside your application. The EDraw Office Viewer Component is an Active X control written in MFC. The download includes some sample codes to use it inside Visual Basic, HTML pages, C#, Asp.NEt. You can also enable and disable specific functionality by using a full set of properties, methods, and events exposed for customization.

You can also host the control inside managed applications following these simple steps:

1. Downlad the EDraw Office Viewer Component.
2. Open Visual Studio .NET. 
3. Open your WinForms or WebForms application.
4. Add the EDraw Office Viewer Component to the Toolbox: 
5. On the Tools menu, click Customize Toolbox (in Visual Studio .NET 2002), or click Add/Remove Toolbox Items (in Visual Studio .NET 2003 or 2005), and then click the COM Components tab. 
6. On the COM Components tab, select EDraw Office Viewer Component. 
7. Click OK to close the Customize Toolbox dialog box.
8. Select the EDraw Office Viewer Component icon that appears in the ToolBox and drag-and-drop the control over the Form or Web Form.
9. Adjust the control’s docking/size as needed.
10. Build and run the application.
11. Create a new document to test the control.
12. You can call more than one hundred methods to customize your application.

EDraw Office Viewer Component Version 5.1 Released

EDraw Office Viewer Component version 5.1 released yesterday. New version provides more than one hundred methods. Now you can do some office automation with our component directly. You can open and play the slideshow in a customize form. You can create a new excel workbook then fill in the sheet with the data from your database. You can limit the user to edit or print the Word document by setting the readonly mode.

Now the new version supports both the HTTP and HTTPS. It also supports the website with password. Of course you can upload or download the file via FTP too.

What’s new

1. Support HTTP/HTTPS and the website with the password.

2. You can set the Readonly mode for both Word and Excel.

3. You can play the slideshow in the same window without the web toolbars and the scrollbar.

4. Now it’s no problem to open the hyperlink in the office document.

5. Now it’s no problem to play the media, animation, vedio in the PowerPoint slide file.

6. Support Both Print and PrintPreview. You can enable or disable them too.

7. You can put multiple office programs in a form or open multiple EDraw Office Viewer Component instances in the internet explore.

8. Insert the image, text, html, rtf to your Word document with the office automation interfaces.

9. More setting for rulers, gridlines, toolbars, menubars, titlebar, caption and color scheme.

10. Suport the clipboard operator. You can insert the data into the Word or Excel from the clipbard.

EDraw Office Viewer Component for Hosting Office Documents

EDraw Office Viewer Component contains a standard ActiveX control that acts as an ActiveX document container for hosting Office documents (including Microsoft Word, Microsoft Excel, Microsoft PowerPoint, Microsoft Project, and Microsoft Visio documents) in a custom form or Web page. The control is lightweight and flexible, and gives developers new possibilities for using Office in a custom solution.

The control is designed to handle specific issues that make using ActiveX documents from a non-top-level host window difficult, and serves as a starting place for constructing your own embedded object file viewer or editor as an ActiveX control.

It is a great solution for companies wishing to display read-only Word document data and Excel sheet to their employees while restricting modifications to the underlying data. You can play the powerpoint file in the same window. You can also display password protected Word documents without supplying passwords to your users - keep your confidential data safe and secure! With the office ocx it is easy to upload or download file between server and client via HTTP/FTP.

MORE INFORMATION
This component shows allows developers to embed Office files for in-place editing and viewing. It can be easily integrated into applications written in languages that support ActiveX control such as Visual C++, Microsoft Internet Explorer, Visual Basic, Delphi, C++ Builder and .Net languages to view Office files inside their main solution, and give them programmatic control over the document while it is embedded. 

Solved Boundary Errors When Upload a File with Office Viewer OCX

It’s important to solve the boundary errors when uploading a file to a server via HTTP. Now EDraw Office Viewer Component has changed the upload method and added a boundary process for the uploaded file and parameter.

The boundary error could be exploited by remote attackers to cause a denial.  EDraw suggests all the user updated to the latest version if they are developping a web application with the office viewer ocx but they have the vulnerable server.

Embedding ms office in C# Forms

With EDraw Office Viewer Component, it’s easy to embed the ms office program in c# froms or html pages. Only drag it to your form, you can call some method to do the office automation directly such create a Word document or initialize an Excel sheet.

The DSOFramer deletes the Word file when saves

Word 2007 File Seems To Be Deleted When You Open And Save It Using DSOFramer.

If you are using DSOFramer sample to host Office Documents, whenever he tried to open and save Word 2007 documents in this manner, guess what !! the file seems to be deleted !

Because the DSoFramer are moving the file to a temporary directory and then while saving it we are saving the changes in it.  Mostly you will lost the files if you are using Word 2007.

These don’t occurs in EDraw Office Viewer Component.