Public Property ActiveWorkbook() As IWorkbook Implements Interfaces.IExcelWorkBook.Workbook
Dim AW As SpreadsheetGear.IWorkbook, Range As SpreadsheetGear.IRange
Public Sub Workbook_Open(OldRoot As Grid, NewRoot As Grid, Excel As SpreadsheetGear.Windows.Co**ols.WorkbookView) Implements Interfaces.IExcelWorkBook.Workbook_Open
Excel.GetLock()
AW = Excel.ActiveWorkbook
Range = AW.ActiveWorksheet.Range
Excel.ReleaseLock()
End Sub '打开时执行事件
Public Sub RangeSelection(sender As Object, e As SpreadsheetGear.Windows.Co**ols.RangeSelectionChangedEventArgs) Implements Interfaces.IExcelWorkBook.RangeSelection
End Sub '单元格选择后执行的事件
Public Sub RangeChanged(sender As Object, e As SpreadsheetGear.Windows.Co**ols.RangeChangedEventArgs) Implements Interfaces.IExcelWorkBook.RangeChanged
End Sub '单元格编辑完成后执行事件
Public Sub ButtunClick(sender As Object, e As SpreadsheetGear.Windows.Co**ols.ShapeActionEventArgs) Implements Interfaces.IExcelWorkBook.ButtunClick
ActiveWorkbook.WorkbookSet.GetLock()
If e.Shape.Name = "Button 1" Then
'判断是否OOB模式运行
If Application.Current.IsRunningOutOfBrowser = True Then
'实例化Word接口
Dim _myWord As Object = AutomationFactory.CreateObject("Word.Application")
With _myWord
.Visible = True
.documents.open("D:\word\abc.doc")
'If _myWord.ActiveDocument.Bookmarks.Exists("Party_Co") = True Then
hessen