?
Solved

ComposeDocument not working on R5

Posted on 2004-10-01
4
Medium Priority
?
387 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: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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…
I thought it will be a good idea to make a post as it will help in case someone else faces these issues. I trust this gives an idea how each entry in Notes.ini can mean a lot for the Domino Server to be functioning properly. This article discusses t…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses

762 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