Skip to main content
This forum is closed to new posts and responses. New discussions are now taking place in the IBM Developer Answers forum.
 
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

  

PreviousPrevious NextNext


Lin Cong 16.Mar.06 10:27 AM a Web browser
Domino Designer 6.0.2 Windows XP


I am not a notes script programer. But some how I attempt to this. Basically the agent shold be able to look in mail and the name of any attachment and finally ftp it. But I don't know how to ftp the files, which their are not in local.
Here are the codes:

Sub Initialize
Dim ses As New notessession
Dim db As notesdatabase
Dim doc As notesdocument
Set db=ses.currentdatabase
Dim doccoll As notesdocumentcollection
Set doccoll=db.unprocesseddocuments
'Dim doc As notesdocument
Set doc=doccoll.getfirstdocument
While Not doc Is Nothing
Dim rtitem As Variant
Dim lname As String
Set rtitem = doc.GetFirstItem( "Body")
If ( rtitem.Type = RICHTEXT ) Then
'On Error Goto jump
res=Evaluate("@Attachments",doc)

If res(0)>=1 Then
Forall o In rtitem.EmbeddedObjects
'Msgbox o.Name
lname = o.Name
Msgbox lname & "", , "Detach Files"


Dim objFTP As NotesFTPSession
Dim fTPDir$, fTPNode$, fTPId$, fTPPw$
Set objFTP=New NotesFTPSession
fTPDir$="brio/csmdvl/sql"
fTPNode$="ftp.lotus.com"
fTPId$="anonymous"
fTPPw$="123456"

With objFTP
.Connect fTPNode$, fTPId$, fTPPw$, 0
Msgbox "Current directory: " & .CurrentDirectory
.ChangeDirectory "tempdir"
Msgbox "Current directory: " & .CurrentDirectory
.PutFile lname, lname, FTP_TRANSFER_TYPE_BINARY
.Disconnect
End With


Delete objFTP

If (o.Type=Embed_attachment) Then
'doc.PutInFolder("view1")
Call o.ExtractFile("C:\DetachAll\a\"+o.Source)
End If
End Forall
End If

'jump:

End If
Set doc=doccoll.getnextdocument(doc)
Wend



End Sub

I think .PutFile lname, lname, FTP_TRANSFER_TYPE_BINARY must be some problems. I hope someone can help me.

Thank you in advance!

Sincerely

Lin Cong








  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

 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 Connections Cloud Developers
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
IBM Connections
IBM Mobile Connect
IBM Sametime
IBM SmartCloud Notes
Lotus Enterprise Integration
Lotus Protector
Lotus Quickr
Lotus SmartSuite