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 4 and 5 Forum

Notes/Domino 4 and 5 Forum

developerWorks

  

Sign in to participate PreviousPrevious NextNext

Mail Attachments being lost
Michael A Skea 2.Dec.03 04:37 PM a Web browser
Domino Designer -- Forms 5.0.12; 5.0.11; 5.0.10; 5.0.9a; 5.0.9; 5.0.8; 5.0.7a; 5.0.7 Windows 2000

I have a mail in database that has a custom forward action. However when there is an attachment in the mail message this seems to be lost as soon as the new message is put into edit mode.
This is the script that is being used.
Dim session As New notessession
Dim db As notesdatabase
Dim collection As notesdocumentcollection
Dim ws As New notesuiworkspace
Dim uidoc As notesuidocument
Dim doc As NotesDocument
Dim nameslist As Variant
Dim newname As Integer
Dim filename As Variant
Dim view As notesview
Dim viewdoc As notesdocument




Set db=session.currentdatabase
Set view = db.getview("(UNID)")
'On Error Resume Next
Set uidoc = ws.currentdocument
If uidoc Is Nothing Then
Set collection = db.unprocesseddocuments
Set doc = collection.getfirstdocument
Else
Set doc = uidoc.document
Messagebox "uidoc found"
End If

Dim newdoc As notesdocument
Dim rtItem As NotesRichTextItem
Dim object As NotesEmbeddedObject
Set newdoc = New NotesDocument( db )
newdoc.Form="Reply with History"
newdoc.From="CdxTechnicalSupport"
newdoc.Principal = "CdxTechnicalSupport"
newdoc.SendTo=""
newdoc.CopyTo=""
newdoc.Subject=doc.Subject(0)

Set rtitem = doc.getfirstitem("body")
Set newRTItem = New NotesRichTextItem ( newdoc, "Body" )
Call newrtitem.AppendRTItem( rtitem )
Call newrtitem.AddNewLine(1)
'Set object = newrtitem.EmbedObject _
'( EMBED_ATTACHMENT, "", "c:\Temp\"+filename(0))
Call newdoc.Save( True, True )
Call view.refresh
Sleep 10
Messagebox newdoc.UniversalID


unid$ = newdoc.UniversalID

Messagebox "UNID$ " + unid$

Set viewdoc = view.getdocumentbykey(unid$,True)
If viewdoc.hasitem("$file") Then
Messagebox "has item"
End If

'Dim newws As New notesuiworkspace
Dim newuidoc As notesuidocument

Set newuidoc = ws.editdocument(True,viewdoc)

Exit Sub

Thanks in advance






  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
Forum use and etiquette
Native Notes Access
Web site Feedback

  Lotus Support
Lotus Support
Product support pages index
Search knowledge base (Technotes)
Search support downloads
Lotus Support RSS

 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
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