Martin Henke 8.Apr.10 06:10 AM a Web browser General 7.0.3 FP1; 7.0.3; 7.0.2 FP3; 7.0.2 FP2; 7.0.2 FP1; 7.0.2; 7.0.1 FP1; 7.0.1; 7.0; 6.5.6; 6.5.5 FP3; 6.5.5 FP2; 6.5.5 FP1; 6.5.5; 6.5.4 FP3; 6.5.4 FP2; 6.5.4 FP1; 6.5.4; 6.5.3 FP2; 6.5.3 FP1; 6.5.3; 6.5.2 FP1; 6.5.2; 6.5.1 Windows Vista; Windows 2003; Windows 2000; Windows XP
what I want to do is to export a selected message to DXL.
Problem is that I want to export notesbitmaps as GIF.
As this can only be done with Domino.DxlExporter I wrote an agent which should do the export (as the feature ConvertNotesbitmapsToGIF is present there). My agent works, when calling it from the menu. However, if I call it from my program, I get reported that the agent was executed, but the export file is not there. If possible, I would like to avoid using an agent alltogether, and use the Domino.DxlExporter in my program. But then the difficulty is that I only get a Lotus.NOTESSESSION from the PostOpen script which I cannot use to create a Domino.DxlExporter...
Please find the agent, PostOpen and application source code below. The application is called from the PostOpen script.
Dim session As New NotesSession
Dim db As NotesDatabase
Dim dxlExporter As NotesDXLExporter
Dim dxlStream As NotesStream
Dim dlxContent As String
Dim message As NotesDocument
Msgbox "Starting agent"
Set uiWorkspace = CreateObject("Notes.NotesUIWorkspace")
If Not uiWorkspace Is Nothing Then
Set uiView = uiWorkspace.CurrentView
If Not uiView Is Nothing Then
Set message = db.GetDocumentByID(uiView.CaretNoteID)
If Not message Is Nothing Then
Msgbox "Setting dxlStream"
Set dxlStream = session.CreateStream
Msgbox "Creating output file"
Msgbox "Setting Exporter"
Set dxlExporter = session.CreateDXLExporter(message)
dlxContent = dxlExporter.Export
Msgbox "Writing text to file"
Msgbox "Closing Stream"
Msgbox "message is Nothing"
Msgbox "uiView is Nothing"
Msgbox "uiWorkspace is Nothing"