terça-feira, 17 de junho de 2008

Code for saving the HTML and CSS theme files from Quickr/Quickplace resources.nsf file to disk

As I could not find a better place to store it...

Dim session As New notessession
Dim db As notesdatabase
Dim col As notesdocumentcollection
Dim doc As notesdocument
Dim item As Variant
session.ConvertMime = False

Dim filenum As Integer

Set db = session.currentdatabase
Set col = db.UnprocessedDocuments

If Not col Is Nothing Then

If col.Count > 0 Then

Set doc = col.getfirstdocument
Do While Not doc Is Nothing

filenum = Freefile
filename = Strrightback(doc.h_name(0),"\")

Open "c:\" & filename For Output As filenum
Set item = doc.getfirstitem("h_Body")
Set mimeentity = item.getmimeentity

'Msgbox mimeentity.contentastext
Print #filenum,mimeentity.contentastext

Close #filenum

Set doc = col.getnextdocument(doc)

End If
End If

session.ConvertMime = True

You'll have to create the agent in the resources.nsf database and select the documents from system\skins view and run it.

Good luck!

Edson Luis Almeida Viana
IBM Certified Advanced System Administrator - Lotus Notes and Domino 5/6/6.5/7/8
IBM Certified Advanced Application Developer - Lotus Notes and Domino 5/6/6.5/7
e-Mail and Collaboration Services, ITDelivery

Nenhum comentário: