This project has moved. For the latest updates, please go here.
' taken from Tutorial08.vbproj
' Any object in NetOffice implements a special method too see at runtime a specified property or method is available
' This is very important because not any property or method is available in any office version ' ' bool EntityIsAvailable(string name) ' bool EntityIsAvailable(string name, SupportEntityType searchType) ' ' This example shows you how to use. ' ' See chapter8 in technical documentation for further info. Sub Foo ' Initialize NetOffices LateBindingApi.Core.Factory.Initialize() ' create new instance Dim application As New Excel.Application() ' check for support at runtime Dim enableLivePreviewSupport As Boolean = application.EntityIsAvailable("EnableLivePreview") Dim openDatabaseSupport As Boolean = application.Workbooks.EntityIsAvailable("OpenDatabase") Dim result As String = "Excel Runtime Check: " + Environment.NewLine result += "Support EnableLivePreview: " + enableLivePreviewSupport.ToString() + Environment.NewLine result += "Support OpenDatabase: " + openDatabaseSupport.ToString() + Environment.NewLine richTextBoxResult.Text = result ' quit and dispose application.Quit() application.Dispose() End Sub

Last edited Nov 13, 2011 at 10:55 PM by SebastianDotNet, version 4


No comments yet.