Saturday, May 27, 2006

NotesDXLExporter export fails on document with attachment

This is from an my answer to a post on Notes.net.
The problem was that NotesDXLExporter failed to export document in UI to XML if there was an attachment in the document, even if the document was manually saved in UI.


I could reproduce this error.
It happens under following conditions:
a)create a new mail document, add attachment to it, save the document but do not close it. Run the code (agent action or form button).
b)open an existing mail document, add attachment to it, save the document without closing it. Run the code.

It happens only with attachments, adding an inline picture does not generate the error. Triggering a LS agent to perform export results in same error.

Once you closed and re-opened the document, everything works fine until you add a new attachment.

Maybe some antivirus attachment control operations can make Notes think that attachment is new even on "old" documents, but I could not test this.

I could however make the DXLExporter work by programmatically re-opening the document, I guess it's the only solution:


Sub Click(Source As Button)
Dim session As New notessession
Dim doc As notesdocument
Set ws=New NotesUIWorkspace
Set uidoc = ws.CurrentDocument
Set doc = uidoc.Document
Call uidoc.save
Call uidoc.close

Set ws=New NotesUIWorkspace
Set uidoc=ws.editdocument(False, doc)
Set doc = uidoc.Document
Set dxle = session.CreateDXLExporter
Msgbox dxle.Export(doc)
Msgbox dxle.Log
End Sub

8 comments:

Simatupang said...

https://www.indomaxbett.org/
http://www.club1628.net/
http://www.daftarslotjoker123.org/
https://www.sbobett88.asia/

NIta said...

Permainan Poker Online Texas holdem sudah menjamur dimana-mana, terima kasih kepada IDN Poker yang telah membawa permainan ini menjadi permainan poker online yang menggunakan uang asli Rupiah di Indonesia. sehingga bisa dimainkan dimana saja dan kapan saja melalui smartphone oleh semua orang. Berhubung semua orang bisa memainkannya maka semakin susah untuk memenangkan setiap permainan poker karena setiap orang pasti akan mengevaluasi dan meningkatan kemampuan bermainnya setelah mereka kalah.

chaelinsugar said...

Untuk mencari situs judi online di indonesia, kami dapat memberikan situs rekomendasi :

idnpokeronline.me
https://iyapoker99.online
ion casino

Sbobet said...

kami menyediakan berbagai permaianan judi online yang sudah aman dan terpercaya di bawah ini.
Poker77
Judi Poker Online
Kiu Kiu Poker
Poker Texas Boyaa
Club poker88
domino338
sbobet777 slot

sinx said...

I really appreciate this wonderful post that you have provided for us. I assure this would be beneficial for most of the people. thank you for sharing information
Asia88
Sbobet777
sbobet188
Sbobet99
idn play
Poker QiuQiu
Sbobet Mobile Login

tiger said...

Thanks for posting this info. I just want to let you know that I just check out your site and I find it very interesting and informative. I can't wait to read lots of your posts.
7mmbet
sbobet365 slot
Sobet88
www joker6699 net slot
Sbobet365
Sbobet88

SAGEK said...

GOOD BLOG..... I LIKE IT!!!
Link Sbobet188 Asia Login Apk

Lucky Slot Game Online said...

Joker123 merupakan salah satu situs yang bekerjasama dengan agen judi online terpercaya LuckyPoker77 dengan game terbaru slot joker gaming online 2021. read more