Skip to main content
 
developerWorks
AIX and UNIX
Information Mgmt
Lotus
New to Lotus
Products
How to buy
Downloads
Live demos
Technical library
Training
Support
Forums & community
Events
Rational
Tivoli
WebSphere
Java™ technology
Linux
Open source
SOA and Web services
Web development
XML
My developerWorks
About dW
Submit content
Feedback



developerWorks  >  Lotus  >  Forums & community  >  Notes/Domino 6 and 7 Forum

Notes/Domino 6 and 7 Forum

developerWorks

  

Sign in to participate PreviousPrevious NextNext


lathan reddy 23.Mar.12 11:44 AM a Web browser
Domino Designer 7.0.1 Windows XP


Hi All ,

Some one could help me pls,

I Have button called "Display" and that contains the code as below.


Sub Click(Source As Button)

Dim workspace As New notesuiworkspace
Dim session As New notessession
Dim db As notesdatabase
Dim uidoc As NotesUIDocument
Dim folder As notesview
Dim view As notesview
Dim linedoc As NotesDocument
Dim keyworddoc As NotesDocument
Dim oldline As Variant

Dim itemdoc As NotesDocument
Dim newbody As Variant
Dim appendix As Variant
Dim apptable As Variant
Dim searchdoc As String

Set db=session.currentdatabase
Set uidoc = workspace.CurrentDocument
Set itemdoc = uidoc.Document
Set newbody = New NotesRichTextItem(itemdoc,"Body_R")

itemnum = uidoc.fieldgettext("Item_T")
appnum = itemnum + "\" + itemnum + " APP"
Set folder = db.getview( itemnum)

' get first line document of item folder then get the WholeLine_R field from
' each line document until all line documents within the folder have been processed
' append each WholeLine_R field to the previous one in the Body_R field
Set linedoc = folder.getfirstdocument
While Not(linedoc Is Nothing)
Set oldline = linedoc.getfirstitem("WholeLine_R")
Call newbody.appendrtitem(oldline)
Call newbody.AddNewLine(1)
Call linedoc.save(False,True)
Set linedoc=folder.getnextdocument(linedoc)
Wend

' get appendix table from keyword document for the item

Set appendix = New NotesRichTextItem(itemdoc,"Appendix_R")
Set view = db.getview("ItemLookup_V")
Set keyworddoc = view.getdocumentbykey(itemnum)
Set apptable = keyworddoc.getfirstitem("KeywordDesc3_R")

Call appendix.appendrtitem(apptable)


' Save and open the document so that all changes can be seen

Call uidoc.close
searchdoc = itemdoc.Item_T(0)
itemdoc.form = "Item_D"
Call itemdoc.save(False,False)

Set view = db.getview("Items_V")
Call view.Refresh
Call workspace.viewrefresh
itemdoc.saveoptions = "0"
Call uidoc.close
On Error Goto ErrHandle
Call workspace.OpenDatabase("","","Items_V",searchdoc,False,True)
If Err = ErrOutOfMemory Then
Print "Memory - Double click " + itemnum + "to see finished document"
End If
If Err = ErrOpenFailed Then
Print "Open - Double click " + itemnum + "to see finished document"
End If
Set uidoc = workspace.Editdocument(True)
Set itemdoc = uidoc.document
itemdoc.saveoptions = "0"
Call itemdoc.save(True,True)
Set uidoc = workspace.Editdocument(False)
ErrHandle:
' Messagebox "Error" & Str(Err) & ": " & Error$
Exit Sub
End Sub
******************************************************************

When i debug the code i am strucking Line (Call newbody.appendrtitem(oldline))

I am not sure where i did the wrong ,Could you please halp me.

I am getting error messaage:Type mismatch in method RunStkCoerceVal:AINSTANCE found,Unknown expected






Error Message: Type mismatch in met... (lathan reddy 23.Mar.12)
. . RE: Error Message: Type mismatch in... (lathan reddy 26.Mar.12)
. . . . RE: Error Message: Type mismatch in... (Dave Grande 28.Mar.12)
. . . . . . RE: Error Message: Type mismatch in... (lathan reddy 30.Mar.12)





  Document options
Print this pagePrint this page

 Search this forum

  Forum views and search
Date (threaded)
Date (flat)
With excerpt
Author
Category
Platform
Release
Advanced search

 Sign In or Register
Sign in
Forgot your password?
Forgot your user name?
Create new registration

 RSS feedsRSS
All forum posts RSS
All main topics RSS
More Lotus RSS feeds

Resources

 Resources
Forum use and etiquette
Native Notes Access
Web site Feedback

Lotus Support

 Lotus Support
IBM Support Portal - Lotus software
Lotus Support documents
Lotus support by product
Lotus support downloads
Lotus support RSS feeds

Wikis

 Wikis
IBM Composite Applications
IBM Mashup Center
IBM Connections
IBM Docs
IBM Forms
IBM Mobile Connect
IBM Sametime
IBM SmartCloud for Social Business
IBM Web Experience Factory
Lotus Domino
Lotus Domino Designer
Lotus Expeditor
Lotus Foundations
Lotus iNotes
Lotus Instructor Community Courseware
Lotus Notes
Lotus Notes & Domino Application Development
Lotus Notes Traveler
Lotus Protector
Lotus Quickr
Lotus Symphony
IBM Web Content Manager
WebSphere Portal

Lotus Forums


 Lotus Forums
Notes/Domino 9.0
Notes/Domino 8.5 + Traveler
Notes/Domino XPages development forum
Notes/Domino 8
Notes/Domino 6 and 7
Notes/Domino 4 and 5
IBM Connections
IBM Forms
IBM Mobile Connect
IBM Sametime
IBM SmartCloud Notes
IBM SmartCloud Meetings
IBM Web Content Manager
Lotus Domino Document Manager
Lotus e-learning
Lotus Enterprise Integration
Lotus Expeditor
Lotus Protector
Lotus Quickr
Lotus SmartSuite
Lotus Symphony
Lotus Symphony Developer Toolkit Support
Lotus Workflow