Thanks for all the help guys. Just one last question (I think)...
All the samples in the API are either too vague, or is just completely over my head...
I don't see anything specifically about printing or openning dwf files...
I see where they are iterating through pages and such, but they assume a dwf file is already loaded.
I want my dwf file to be a variable which is set depending on certain code criteria.
Here is what I think I need from the API sample, I just need to modify it to allow me to either print or open a dwf file with dwfviewer through Access vba.
I have this. I assume it is to activate the dwfviewer so I can open my DWF files??Dim Viewer As EPlotViewer.IAdEPlotViewer2
I don't thing I need this, but I think I probably need something similar?Private Sub SetSourcePath(FileName As String)
'Accept the full path, relative path, FTP or HTTP path.
CExpressViewerControl1.SourcePath = FileName
End Sub
Not sure if I need any of this, since it seems like the file is already loaded and just deals after the fact.Private Sub CExpressViewerControl1_OnEndLoadItem(ByVal bstrItemName As String, ByVal vData As Variant, ByVal vResult As Variant)
Set Viewer = Nothing
Set Viewer = CExpressViewerControl1.DocumentHandler
If bstrItemName = "DOCUMENT" Then
'The document is fully loaded, but the sheets may not have
'been loaded yet.
'At this point, you can access all the sheets in the DWF file.
Call SetToolbarProperties
Call IterateThroughPages
ElseIf bstrItemName = "SHEET" Then
'A sheet is finished loading, either as a first sheet upon opening
'the document or as a change of sheets.
Call IterateThroughLayers
ElseIf bstrItemName = "SPACE" Then
'A 3D DWF sheet has been loaded.
'Currently, the DWF Viewer does not support any APIs for 3D DWFs.
'You can give a message to the user that a 3D DWF has been loaded.
MsgBox "A 3D DWF has been loaded"
End If
End Sub