Domino 9 und frühere Versionen > ND6: Entwicklung

I can't copy docs from a db to another

<< < (3/3)

Toma Bogdan:

--- Zitat von: TMC am 10.06.04 - 21:00:07 ---
--- Zitat von: Toma Bogdan am 10.06.04 - 20:37:30 ---no; it is tru that some docs was copied from a mail db
--- Ende Zitat ---

I usually copy only the needed source items to a new document.
Usually I only need the fields 'Date', 'Receiver', 'CC', 'Subject' and 'Body' of a mail-doc.
This prevents having unnecessary fields (like KeepPrivate and all the other stuff which provides an email-doc) in my target database.

Maybe that would be a solution for you?

Matthias

--- Ende Zitat ---

you have right but I copy the mails using the code Set docnou= doc.Copytodatabase(db3) so I can't decide which fields I don't need to be copied... isn't it ?

TMC:
You're right, with this method you copy the whole document.

But you could use the CopyItemToDocument method of the notesItem - class.

Example:
Dim dbNew As New NotesDatabase("" , "MyDB.nsf") 'Target DB
Set docNew = New NotesDocument( dbNew )
'.......
Set itemSender = doc.GetFirstItem( "From" )
Call itemSender.CopyItemToDocument( docNew, "MyItem_Sender" )

Give it a try :-)

Matthias

Toma Bogdan:

--- Zitat von: TMC am 10.06.04 - 21:33:23 ---You're right, with this method you copy the whole document.

But you could use the CopyItemToDocument method of the notesItem - class.

Example:
Dim dbNew As New NotesDatabase("" , "MyDB.nsf") 'Target DB
Set docNew = New NotesDocument( dbNew )
'.......
Set itemSender = doc.GetFirstItem( "From" )
Call itemSender.CopyItemToDocument( docNew, "MyItem_Sender" )

Give it a try :-)

Matthias

--- Ende Zitat ---
good ideea ! 10x a lot !  8)

Navigation

[0] Themen-Index

[*] Vorherige Sete

Zur normalen Ansicht wechseln