Ultra Office Control 2.0
Features | Manual | FAQ

Do you want to develop a desktop application with Microsoft Office integration such as Word, Excel and Powerpoint etc? Do you want to display Word, Excel and Powerpoint document in your web application? Do you want to host Active documents in your Winforms program? All these things now can be easily achieved by using our Ultra Office Control.

Ultra Office Control is a standard ActiveX control that can be used as an ActiveX document container. It can be easily integrated into applications written in languages that support ActiveX control such as Visual C++, Visual Basic, Delphi, C++ Builder, .Net languages (VB.Net, J#, C#), Developer, and web pages with Internet explorer.


Key Benefits:

Ultra Office Control support hosting Office documents in your application by implementing a full featured ActiveX document container. Now you can create, open, edit, view and save office documents such as *.doc, *.docx, *.xls, *.xlsx, *.ppt, *.pptx etc in your own program's window. With Ultra Office Control, you can have Office run embedded inside your custom solution.

Ultra Office Control also supports hosting PDF files in your application with foxit PDF reader. We have also added office 2013 support recently

Free Download & Try Now Try it before purchase without any risk!
Buy Now
. Get the registration code instantly. $149.95 For Single Developer License.  $299.95 For Development Team License.

Ultra Office Control can be used in desktop application developed by Win32 or Winform technology. Also it can be easily integrated to your web application so as to allow your web users to operate Office documents online. Ultra Office Control is lightweight and flexible, and gives developers new possibilities for using Office.

If you still hesitate, download Ultra Office Control and try out for FREE!

Highlight Features:

Version:

2.0.2013.612

Keywords:

ActiveX, host, Office documents, Word, Excel, Powerpoint, Visio and Project, embed Office, host Office, host pdf, pdf view, pdf reader

System Requirements:

Designed for Windows 98/2000/XP/Vista, Microsoft Office 97, 2000, XP, 2003, 2007, 2010

Manual

Ultra Office Control has the properties or methods below:

Types:

Enum ocBorderStyle

Description: border style of the control

ocBorderNone = 0
ocBorderFlat = 1
ocBorder3D = 2
ocBorder3DThin = 3

Enum ocFileCommandType

Description: the command on the control's file memu

ocFileNew = 0
ocFileOpen = 1
ocFileClose = 2
ocFileSave = 3
ocFileSaveAs = 4
ocFilePrint = 5
ocFilePageSetup = 6
ocFileProperties = 7
ocFilePrintPreview = 8

Enum ocShowDialogType

Description: dialog type

ocDialogNew = 0
ocDialogOpen = 1
ocDialogSave = 2
ocDialogSaveCopy = 3
ocDialogPrint = 4
ocDialogPageSetup = 5
ocDialogProperties = 6

Properties:

Property ActiveDocument As Object

Description: Returns the Automation interface of the document object.

Property BackColor as Long

Description: Returns/sets the background color of the control.

Property BorderColor as Long

Description: Returns/sets the border color of the control.

Property BorderStyle as ocBorderStyle

Description: Returns/sets the border style for the control.

Property Caption As String

Description: Returns/sets the titlebar caption.

Property DocumentFullName As String

Description: Returns full document path name for object.

Property DocumentName As String

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

Property EnableFileCommand(ByVal Item As ocFileCommandType) As Boolean

Description: Returns/sets whether a specific action item is enabled.

Property EventsEnabled As Boolean

Description: Gets/sets whether control events are raised.

Property HostName As String

Description: Returns/sets host application name (used in embedding).

Property IsDirty As Boolean

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

Property IsReadOnly As Boolean

Description: Returns True/False if file was open read-only, or has not been saved.

Property EventsEnabled As Boolean

Description: Gets/sets whether control events are raised.

Property Menubar As Boolean

Description: Returns/sets whether a menu bar should be displayed.

Property Titlebar As Boolean

Description: Returns/sets whether the titlebar should be displayed.

Property TitlebarColor as Long

Description: Returns/sets the color of the titlebar.

Property TitlebarTextColor as Long

Description: Returns/sets the color of text for the titlebar.

Property Toolbars As Boolean

Description: Returns/sets whether toolbars should be displayed.

Methods:

Sub CreateNew(ByVal ProgIdOrTemplate As String)

Description: Creates a new document based on the ProgId or Template file provided.
ProgIdOrTemplate: the program ID or a file path of the active document

The CreateNew method on the control allows you to build your own method to start new documents. The method takes either a Programmatic Identifier (ProgId) of the ActiveX document type that you want to start, or the path to an Office template file. For example, you can use the following Office ProgIds.

  Excel Spreadsheet  			"Excel.Sheet" 
Excel Chart "Excel.Chart"
PowerPoint Presentation "PowerPoint.Show"
Project Database "MSProject.Project"
Visio Drawing "Visio.Drawing"
Word Document "Word.Document"

Sub Open(ByVal Document, [ByVal ReadOnly], [ByVal ProgId], [ByVal WebUsername], [ByVal WebPassword])

Description: Opens a document from an word, excel or ppt file, URL, or Automation object.

Document: can be a file path or URL to the office file
ReadOnly: true or false
ProgID: the program ID of the active documents
WebUsername: the username to access the web URL
WebPassword: the password to access the web URL

Example:

obj.Open "C:\TestBook.xls"
obj.Open "C:\Plain.txt", , "Word.Document"
obj.Open "https://secureserver/test/mytest.asp?id=123", True, "Excel.Sheet", "MyUserAccount", "MyPassword"

Sub Close()

Description: Closes the currently open office document.

Sub Activate()

Description: Activates the current document object.

Sub PrintOut([ByVal PromptUser], [ByVal PrinterName], [ByVal Copies], [ByVal FromPage], [ByVal ToPage], [ByVal OutputFile])

Description: Prints current document to specific printer with settings.

Sub PrintPreview()

Description: Starts a print preview (if document supports it).

Sub PrintPreviewExit()

Description: Exits a current print preview.

Sub Save([ByVal SaveAsDocument], [ByVal OverwriteExisting], [ByVal WebUsername], [ByVal WebPassword])

Description: Saves the document to specified location or its original location.

Example:

obj.Save "c:\1.doc"
obj.Save "http://myserver/mypresentations/test.ppt"

Sub ShowDialog(ByVal DlgType As ocShowDialogType)

Description: Displays a modal dialog of the given type for user action.

Function IsInstalled(ByVal ProgId As String) As Boolean

Description: Quick check if the document server is installed

SetCode(String strCode)

Description: Call this method to set the registration code to the component so as to unlock the trial version

Function GetUserTempIEFilesFolder() As String

Description: Returns IE temporary path.

Function HttpUpload(ByVal strUrl As String, ByVal strFile As String, ByVal strPostData As String) As Boolean

Description: http/https POST upload

Function GetUploadResult() As String

Description: Get upload result information

Function IsUploadDone() As Boolean

Description: is uploading done or not

Events:

Event BeforeDocumentClosed(ByVal Document As Object, Cancel As Boolean)

Description: Called before document is closed (may be canceled).

Event BeforeDocumentSaved(ByVal Document As Object, ByVal Location As String, Cancel As Boolean)

Description: Called before document is saved (may be canceled).

Event OnActivationChange(ByVal fGoingActive As Boolean)

Description: Called when component gains/loses activation.

Event OnDocumentClosed()

Description: Called when document is closed.

Event OnDocumentOpened(ByVal File As String, ByVal Document As Object)

Description: Called when document is opened or new document added.

Event OnFileCommand(ByVal Item As ocFileCommandType, Cancel As Boolean)

Description: Called when File menu item is selected by user (may be canceled).

Event OnPrintPreviewExit()

Description: Called when print preview is closed.

Event OnSaveCompleted(ByVal Document As Object, ByVal DocName As String, ByVal FullFileLocation As String)

Description: Called when save is successful.

FAQ:

How much does it cost ?

It is $149.95 for Single developer license. Registered users can get free update for lifetime. If you want to purchase multiple license, please contact us for discount. No addtional runtime fee is needed.

Source code license is also available, please contact us with below email for details. We will give you a quote about buying the source code of the component which is in C++.

How do I use Ultra Office Control on 64bit windows with .Net C# or VB?

64 bit windows 7 or vista has become popular. Ultra Office Control can work well on 64 bit machine. But you need to pay attention below points:
1. Ultra Office Control itself is 32 bit and so does Office. We may create 64 bit control later if Office supports 64 bit
2. If you use Ultra Office Control in C# or VB.Net, be sure to compile your application to x86 instead of AnyCPU. Because AnyCPU .Net application will run as 64 bit process on 64 bit windows.

How do I control the activation of the office document ?

If you see message like this "Unable to display the inactive document.  Click here to reactivate the document." when using ultra office control to host or embed word, excel or project document, you can do like this in your code to control the activation of the component. The following is an example in C#.

public Form1()
{
InitializeComponent();

axFramerControl1.FrameHookPolicy = OfficeCtrl.ocFrameHookPolicy.ocSetOnFirstOpen;
axFramerControl1.ActivationPolicy = OfficeCtrl.ocActivationPolicy.ocKeepUIActiveOnAppDeactive;
}


How do I automate word when I use Ultra Office Control?

The active document property will return the IDispatch interface to the office document. It can be used to automate the underline office application.  Here are some quick examples:
1. add text in the word document.  See demo\html\wordautomate.htm

     <!-- demo: add text to word with automation -->
   Sub NewDoc()
     On Error Resume Next
     oframe.CreateNew "Word.Document"
     set doc = oframe.ActiveDocument
     doc.Content.Text = "hello world!"
   End Sub

2. automate excel, it demos how to fill excel cells and create a graph. See demo\html\excelautomate.htm

3. automate ppt, it demos how to create slides in vbscript by working with Ultra Office Control. See demo\html\pptautomate.htm

How do I upload the document to my server? Is there a demo?

Yes we provide upload function working with server side CGI program (We provide php and ASP.Net CGI demo).

To use the asp.net upload demo (Demo\Upload\ASP.NET), copy the files under demo\Upload\PrecompiledWeb\ASP.NET to c:\inetpub\wwwroot, then run the CSharp winform demo (Demo\CSharp), try the "http upload" button
also make sure the IIS user can write the website root folder.


Does the software support Office 2013?

yes, Office 2013 can work with below registry fixes. Save below lines into office.reg file, then import into the registry of the machine.

It can work with Word, Excel, Powerpoint and Vision 2013.

 

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{F4754C9B-64F5-4B40-8AF4-679732AC0607}\DocObject]

[HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{00020830-0000-0000-C000-000000000046}\DocObject]

[HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{CF4F55F4-8F87-4D47-80BB-5808164BB3F8}\DocObject]

[HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{00021A15-0000-0000-C000-000000000046}\DocObject]

[HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{74B78F3A-C8C8-11D1-BE11-00C04FB6FAF1}\DocObject]

 

 

How to handle the message "Cannot access document when in modal condition."?

If you use Ultra Office control on web page, make sure the web page is fully loaded before calling any methods of Ultra Office Control.

Where to get support?
Please email to admin@guangmingsoft.net for any other help.

History:

06/15/2014 Office 2013 can be supported with some registry fix
02/01/2011 New Year Release for 2011
4/16/2010  Fix issues: powerpoint add-in issue and pdf hosting support
2/10/2010  Fix issues: powerpoint tool bar and update FAQ
07/01/2008 Updated C# demo with embedding visio and project support
05/01/2008 Updated upload demo with ASP.Net
10/01/2007 First public release