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


Chris J Richards 11.May.12 06:39 AM a Web browser
Domino Designer All Releases All Platforms


Hi guys,

I have some code that gets information about an attachment file, (size, source, etc) which is then stamped onto a new document, and the attachment copied to the new document.

This works fine with fields with only 1 attachment, but when there is 2 or more attachments, it created 2 documents (correct) each document has the different attachment size, source etc (correct) however each document, has both attachments on it, when i only need 1 attachment - relevent to the size, source etc that I have copied.

Is there anyway to get all objects for attachment 1, and copy attachment 1, then get all objects for attachment 2, and copy attachment 2 and so on?

Code is below... Thanks

Set rtItemAtt1 = thisDoc.GetFirstItem("Attachments_Information")
If Not (rtItemAtt1 Is Nothing) Then
If (rtItemAtt1.Type = RICHTEXT) Then
If IsArray(rtItemAtt1.EmbeddedObjects) Then
ForAll o In rtItemAtt1.EmbeddedObjects
If (o.Type = EMBED_ATTACHMENT) Then

'Get UID of eSupport document, title and size of attachment
attUID = thisDoc.Universalid
attTitle = o.Source
attSize = o.FileSize

'COPY VALUES TO NEW DOCUMENT
Set copyDoc = copyDB.CreateDocument
copyDoc.Form = "F_Attach"
copyDoc.attTitle = attTitle
copyDoc.attSize = attSize
copyDoc.attUID = attUID
copyDoc.AttDateTime = Now
'This is not the secure tab section so say "no"
copyDoc.attSecure = "No"
'Copy attachment to new document
Call rtItemAtt1.CopyItemToDocument(copyDoc,"attFile")
Call copyDoc.Save(True, False)

End If
End ForAll
End If
End If
End If






Copy one attachment at a time (Chris J Richard... 11.May.12)
. . RE: Copy one attachment at a time (Konrad Hoszwa 31.May.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