havne't tried but I can....
Main Topics
Browse All TopicsThe following code is doing just about everuthing except that the BODY of the original replay message is not being copied into the new document. This script is running on a querysend of a reply form. The intent is to copy the make a new copy of the reply in a mailin db. It does create the new document and keeps MOST of the subject line but the entire body of the reply is missing. When i check the properties of the newly created document on the mainin db the body is missing. It's basically a method for filing emails and replies. On the memo creation I email the document into the main in db which works fine but emailing a reply DOES NOT work so I've tried to create a new doc with all the items from the source document and it doesn't get the body field from the original reply ....................
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Where in the code did you place the Call itema.CopyItemToDocument(m
I needs to be after Set memo = New NotesDocument(jobcorDB)
and Set doc = Source.Document
also you are certain the doc has a field called Memo on it. Object variable not set means that ItemA was not set with the Memo field on Doc
So even after the doc.Save, it doesn't work. I was already afraid of that, the document really needs to be reopened for the rich-text to be correctly "settled" in the document. If the CopyItemToDocument doesn't work either, for the same reasons probably, add the following lines after the doc.Save:
Dim id As String
id= doc.UniversalID
Set doc= Nothing
Set doc= db.GetDocumentByUNID(id)
and then do your copy/mail stuff.
Another thought: do you want do save the memo-document? If not, why not just use the current document, add the fields you need for sending, send the current document, and remove the fields you added, and finally save the document? No need to CopyAll or CopyItem etc., no problems with rich text, what a relief... :-P
Ah - another thing i see in the code
You are setting the doc from uidoc. You will need to save the uidoc before you compose the memo form especially if you are adding values to the Body before this code executes. You cannot use the values on the uidoc until the uidoc is saved, if it is a new doc or if values are changed. The notesdocument class will not pick up the values like the NotesUIDocument class.
Do a Call uidoc.save and Call doc.save(False, False) before the following lines in your code
>>customerJob = doc.GetItemValue("Customer
Question - why are you doing this in the queriesend event? Will it not be easier to do from a button on the Form?
Cheers
Wow, got a little confused I've posted my code, still getting errors attemt to execute nested commands and uidoc save cancelled. This is just basically an automatic filing of emails and replies. The original message is being emailed into the mailin db (jobcor) but the rely is causing the issues. I can't email it into the db it seems to go but the doc does not appear in the db. That's why I am trying to create a copy of the doc in the mail in db.....It's crunch time...
Business Accounts
Answer for Membership
by: sjef_bosmanPosted on 2008-11-19 at 15:50:48ID: 23000005
I suppose doc isn't saved yet, so the rich text field Body doesn't really exist yet. Could you try to copyall AFTER the doc.save ??