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.

What’s New in Edraw Office Viewer Component Version 5.1

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.

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. Support the clipboard operator. You can insert the data into the Word or Excel from the clipboard.