I am trying to copy the contents of a RTF from one doc to another. it worked fine for the longest time but now it fails with the following error message:
Warning: Ignoring portion of document that uses a feature from another version of Notes
CAN SOMEONE PLEASE HELP!!!
here is a segment of the code that I am using:
Dim ws As New NotesUIWorkspace
Dim s As New NotesSession
Set uidoc = ws.CurrentDocument
Set db = s.CurrentDatabase
Set doc = uidoc.Document
Set itemA = doc.GetFirstItem( "Body" )
'****Create Fax doc
Set fDoc = db.CreateDocument
fDoc.Form = "iFax"
fDoc.Status = "New"
fDoc.Category = "Medical Review"
fDoc.AreaCode = doc.AreaCode(0)
fDoc.FaxNumber = doc.FaxNumber(0)
fDoc.State = doc.State(0)
fDoc.Subject = doc.Subject(0)
fDoc.LeadSourceNumber = doc.LeadNumber(0)
fDoc.DateRecieved = doc.DateRecieved(0)
fDoc.TimeRecieved = doc.TimeRecieved(0)
'Patient Info
fDoc.MFNAME = doc.MFNAME(0)
fDoc.MLNAME = doc.MLNAME(0)
fDoc.MADD1 = doc.MADD1(0)
fDoc.MADD2 = doc.MADD2(0)
fDoc.MCITY = doc.MCITY(0)
fDoc.MSTATE = doc.MSTATE(0)
fDoc.MZIP = doc.MZIP(0)
fDoc.MPHONE = doc.MPHONE(0)
'Dr Info
fDoc.I4CONM = doc.I4CONM(0)
fDoc.I4INNM = doc.I4INNM(0)
fDoc.I4ADD1 = doc.I4ADD1(0)
fDoc.I4ADD2 = doc.I4ADD2(0)
fDoc.I4CITY = doc.I4CITY(0)
fDoc.I4ST = doc.I4ST(0)
fDoc.I4ZIP = doc.I4ZIP(0)
fDoc.I4PHN = doc.I4PHN(0)
fDoc.I4FAX = doc.I4FAX(0)
Call itemA.CopyItemToDocument( fDoc, "ifBody" )
Call fDoc.MakeResponse( pDoc )
Call fDoc.Save(True,False)
All of Dims are in the Declarations section
Subject: Example. Maybe this will help!
Dim session As New notessession Dim db As notesdatabase
Dim db2 As New notesdatabase("servername", "blank.nsf") 'server name on notes/no server name on web
'Dim view As notesview
'Dim collection As notesdocumentcollection
Dim docA As notesdocument
Set db = session.currentdatabase
'Set view = db.getview("Form A")
'Set collection = db.unprocesseddocuments
'Set docA = collection.getfirstdocument
Set docA = session.documentcontext
Set db2 = New notesdatabase("servername", "blank.nsf")
Dim docB As New notesdocument(db2)
Dim a As String
Dim b As String
Dim c As String
Dim d As String
a = docA.Name(0)
b = docA.Phone(0)
c = docA.Location(0)
d = docA.Dept(0)
docB.Form = "Form B"
docB.Name = a
docB.Phone = b
docB.Location = c
docB.Dept = d
Call docB.save (True, True)
Subject: Another example.
’ these statements declare the variables Dim session As New NotesSession
Dim db As NotesDatabase
Dim db2 As New notesdatabase("servername", "details.nsf")
Dim dc As NotesDocumentCollection
Dim doc As Notesdocument, docA As NotesDocument, docB As NotesDocument
Dim itemA As NotesItem, itemB As NotesItem, itemC As NotesItem, itemD As NotesItem
Dim itemE As NotesItem, itemF As NotesItem, itemG As NotesItem
Dim owner As notesitem
Dim i As Integer
' these statements assign an object reference to the variables
Set db = session.CurrentDatabase
Set db2 = New notesdatabase("servername", "details.nsf")
Set dc = db.Unprocesseddocuments
' this statement collect each document selected in the view
For j = 1 To dc.Count
Set doc = dc.GetNthDocument(j)
Set itemA = doc.getfirstitem ("body")
Set itemB = doc.getfirstitem ("from")
Set itemC = doc.getfirstitem("CopyTo")
Set itemD = doc.getfirstitem("SendTo")
Set itemE = doc.getfirstitem("Subject")
Set itemG = doc.getfirstitem("PostedDate")
'this statement declares the document in the database
Set docB = New notesdocument(db2)
'this is the form the items are copied to and the values on the form
docB.Form = "Document"
Call itemA.copyitemtodocument (docB, "body")
Call itemB.copyitemtodocument(docB, "from2")
If Not itemC Is Nothing Then
Call itemC.copyitemtodocument(docB, "CopyTo2")
End If
Call itemD.copyitemtodocument(docB, "SendTo2")
Call itemE.copyitemtodocument(docB, "Subject2")
Call itemG.copyitemtodocument(docB, "DatePosted")
Set itemF = docB.AppendItemValue("From", session.username)
Call docB.Save(True, True)
Subject: RE: Another example.
neither example will work as it is failing at the Call itemD.copyitemtodocument(docB, “SendTo2”)
Subject: What line does it fail at with the debugger on?
Subject: RE: What line does it fail at with the debugger on?
in Debugger it does not fail at all.It is after the doc is created then a user tries to open the doc, is when I get the error
and it does not allow the doc to open
I have done a compact of the db
I deleted the db and recreated it
I deleted the form and recreated it
no luck on any account
Subject: So what version is the User on? What version is the Creator of the doc on?
Subject: RE: So what version is the User on? What version is the Creator of the doc on?
sorry this is all R6.5.2 Server is iSeries
PC as XP Pro