7,785
社区成员




' 声明一个新的OLE对象
Dim oOleObject As craxdrt.OLEObject
' 声明一个普通对象
Dim oObject As Object
' 声明一个节对象.
Dim oSection As craxdrt.Section
' 当OLE对象找到时,这个变量设为TRUE.
Dim bOle As Boolean
bOle = False
' 在每个节中寻找所有报表对象
For Each oSection In objCRReport.Sections
For Each oObject In oSection.ReportObjects
' 找到第一个OLE对象.
If oObject.Kind = craxdrt.crOLEObject Then
Set oOleObject = oObject
bOle = True
Exit For
End If
Next oObject
If bOle Then Exit For
Next oSection
' 格式化BLOB区域对象
With oOleObject
.BackColor = vbGreen
.SetOleLocation path & "\1234.xls"
End With