可以,我做过了,但代码太长(OCX的代码不太好读),只能摘一部分给你,仅能给个思路:Event Preview(filename As String, ext As String, path As String, rfname As String)
'这个Preview是在ASP页面中的VBS方法,在我的OCX中这样调用:Private Sub mnBkFilePreview_Click()
On Error GoTo handler
    Dim szKey As String
    MousePointer = vbHourglass
    szKey = m_BKSelItem.key    Dim lNodeID As Long, lParentID As Long, nObjectType As Integer, lStorageID As Long, lAccessID As Long, lObjectID As Long, i As Integer
    Dim obj As New ObjectNode
    Dim lPrivilege As Long, b As Boolean, lBookID As Long
    
    obj.m_szConnect = m_szConnect
    obj.m_szServer = m_szServer
    Call parseBKKey(szKey, lBookID, lNodeID, lAccessID)
    If obj.GetCur(lNodeID) = False Then
        MsgBox "无法找到所选书签所对应的数据对象,可能此数据对象已经被删除或移动"
        MousePointer = vbDefault
        Exit Sub
    End If
    nObjectType = obj.m_nObjectType
     
    Dim curFile As New Files, bRet As Boolean
    Dim rfilename As String
    Dim wholename As String
    
    curFile.m_szConnect = m_szConnect
    curFile.m_szServer = m_szServer
    bRet = curFile.GetCur(obj.m_lObjectID)
    
    Dim path As String, filename As String, iNameRoot As String, ext As String
    Dim path1 As String
    
    Call SplitPath(curFile.m_szName, , , filename, ext)
    path = "\" + CStr(curFile.m_lParentID) + "\" + CStr(curFile.m_nFileVersion) + "\"
    path1 = "/" + CStr(curFile.m_lParentID) + "/" + CStr(curFile.m_nFileVersion) + "/"
    
    iNameRoot = "I@" + CStr(curFile.m_lFileID) + "@" + CStr(curFile.m_nFileVersion)
    
    Dim szSQL As String
    szSQL = "select * from Files where FileID=" + CStr(curFile.m_lFileID)
    Set m_ADORs = m_adf.Query(CStr(m_szConnect), CStr(szSQL))
     rfilename = m_ADORs!filename
     wholename = path1 & rfilename
    RaiseEvent Preview(iNameRoot, ext, filename, wholename) ‘*************
    Exit Sub
handler:
    MsgBox Err.Description
End Sub在ASP页面中编写PREVIEW方法;
<html><script LANGUAGE="VBScript">
<!--
Sub window_onLoad()
' msgbox Parent.document.cookie 
NodesTree1.RootString="InterChange文档管理"
on error resume next
NodesTree1.Cookie =Parent.document.cookie

<%
if Session("Workset")<>"" then
%>
'NodesTree1.Workset=<%=Session("Workset")%>
<%
Session("Workset")=""

end if
%>


' nodesTree1.Cookie ="<%=Session("Cookie")%>"
end subSub NodesTree1_preview(Pname,ext, Path,rfilename)
    
if ucase(ext)="DGN" or ucase(ext)="DWG"  then
' parent.main.navigate "<%=Session("PreviewPath")%>action=preview&name=<%=Session("DprPath")%>"+Pname+"-0001/dpr/"+pname+".dpr"
parent.main.navigate "<%=Session("PreviewPath_V10")%>action=preview&pname="+pname+"&nType=1"
    elseif ucase(ext)="TG4" or ucase(ext)="CIT" or ucase(ext)="RLE" then
' parent.main.navigate "<%=Session("PreviewPath")%>action=preview&name=<%=Session("DprPath")%>"+Pname+"-0001/dpr/"+path+".dpr"
parent.main.navigate "<%=Session("PreviewPath_V10")%>action=preview&pname="+pname+"&nType=2"+"&Root="+Path
elseif ucase(ext)="BMP" or ucase(ext)="JPG" or ucase(ext)="TIF" or ucase(ext)="GIF" or ucase(ext)="PCX" or ucase(ext)="CAL" then
' parent.main.navigate "<%=Session("PreviewPath")%>action=preview&name=<%=Session("DprPath")%>"+Pname+"-0001/dpr/"+path+".dpr"
parent.main.navigate "<%=Session("PreviewPath_V10")%>action=preview&pname="+pname+"&nType=2"+"&Root="+Path
'elseif  ucase(ext)="DOC" or ucase(ext)="XLS" then
else                

   ss="<%=session("ftppath")%>"+ rfilename
       'msgbox ss
        'msgbox rfilename
     Parent.main.navigate ss
  
end if
end sub
Sub Nodestree1_CommandEvent(CommandID, Button, ID, nType)
' parent.main.navigate "detail.asp?ID="+cstr(ID)+ "&nType="+cstr(nType)
parent.main.navigate "detail_v10.asp?ID="+cstr(ID)+ "&nType="+cstr(nType)
end sub
--></script><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>Tree </title>
<meta name="GENERATOR" content="Microsoft FrontPage 3.0">
<meta name="Microsoft Border" content="none">
<base target="main">
</head><body bgcolor="#ffffff"><p>
<object classid="clsid:B1D17444-84BA-11D5-BABE-00105A8043D5" id="NodesTree1"
style="LEFT: 0px; TOP: 0px" VIEWASTEXT height="100%" width="100%">
  <param name="_ExtentX" value="18415">
  <param name="_ExtentY" value="15346">
</object>
</p>
<!--
<body bgcolor="#ffffff">
<OBJECT classid="clsid:5BC64185-2DBD-11D3-901C-0020E00FB7C3" id=NodesTree1 style="LEFT: 0px; TOP: 0px" 
VIEWASTEXT height=100% width=100% >
<PARAM NAME="_ExtentX" VALUE="18415">
<PARAM NAME="_ExtentY" VALUE="15346"></OBJECT>
-->
</body>
</html>