Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

ComposeDocument not working on R5

Posted on 2004-10-01
4
Medium Priority
?
391 Views
Last Modified: 2013-12-18
I have a form (that will not be saved - saveoptions field set to 0). This form has a button that should open a new form and then paste certain values into fields on this new form. Here is part of my code on this button:
                Dim workspace As New NotesUIWorkspace
      Dim uidoc As NotesUIDocument      
      Set uidoc = workspace.CurrentDocument
                Call uidoc.GoToField( "CoName" )
      Call uidoc.SelectAll
      Call uidoc.Copy
      Call uidoc.Close
      Set uidoc = workspace.ComposeDocument("","","MyNewForm")
      Call uidoc.GotoField("Company")
      Call uidoc.Paste

I am working in Domino 6. The code is working perfectly on the Notes6 Client, but gives an error on the Notes 5 client. Everything works except the ComposeDocument part. I get an error: "Invalid Formula: unknown function/operator" and when clicked OK: "Unable to find document Window".

I don't want to fiddle too much with the rest of the code, because there are all kinds of other things that are dependent on the copy and pasting, etc. Any help would be appreciated, as this is getting quite urgent and my launch date is around the corner.

THANKS!!
0
Comment
Question by:Zenoe
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 46

Accepted Solution

by:
Sjef Bosman earned 150 total points
ID: 12199116
Copy/Paste is not required. It is far better to work with NotesItems.

     Dim workspace As New NotesUIWorkspace
     Dim uidoc As NotesUIDocument    
    Dim newuidoc As NotesUIDocument    
    Dim doc As NotesDocument
    Dim newdoc As NotesDocument
   
     Set uidoc = workspace.CurrentDocument
    Set doc= uidoc.Document
     Set newuidoc = workspace.ComposeDocument("","","MyNewForm")
    Set newdoc= newuidoc.Document
    newuidoc.Company= doc.CoName(0)
0
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 12199877
There is a timing issue that has always been associated with compose command in R6 and R5.. the tab window behaviour are little different in both versions.. Sjef version should work as you don't involve two uidocs in a sequence...

Or other soln is to compose document in queryclose event of the form...For that you have to mention that it need to compose doc by setting some global variable.

~Hemanth
0
 

Author Comment

by:Zenoe
ID: 12199986
Thanks guys. It turns out that my problem was actually associated with the new form I was opening. This form had one field on it that called a function new to R6 - thus the error. I found Sjef's answer very helpfull though, and will award the points to him.
0
 
LVL 46

Expert Comment

by:Sjef Bosman
ID: 12200323
"Award" and "with a C" are in EE an oxymoron. Might I suggest to ask for a PAQ/Refund (in Community Support) next time when you find the answer yourself? That won't hurt my feelings as much...

Sjef ;)
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For Desktop Techs: How to retain a user's Notes configuration data when swapping out the end user's computer. (Assuming that you are not upgrading to a completely different version of Notes client) All you need to do is: 1) install Notes o…
Sometimes clients can lose connectivity with the Lotus Notes Domino Server, but there's not always an obvious answer as to why it happens.   Read this article to follow one of the first experiences I had with Lotus Notes on a client's machine, my…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Suggested Courses

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question