Domino 9 und frühere Versionen > ND8: Entwicklung

LotusScript Verzeichnis überprüfen erstellen

<< < (3/5) > >>

ascabg:
Davon das es nicht erlaubt ist, redet aber keiner.

Es ist nur so, dass, wenn Du schon in 2 Foren einen Post zu demselben Thema eroeffnest,
dann solltest Du auch darauf hinweisen und am Besten auch einen entsprechenden Link einbinden.

So, ohne irgendwelche Hinweise darauf, wirst Du Dir nicht viele "Freunde" machen.
(wie Tode ja auch schon schrieb)


Andreas

Emre_1996:
okey ich entschuldige mich nocheinmal.

Emre_1996:
Hallo Tode,
ich habe mein Fehler jetzt gefunden. Der Fehler lag an der Zeile mit dem
If(Dir$........

Nun hätte ich da noch ein nächstes Problem, jetzt überprüft der Agent das erste Dokument, erstellt ein Ordner und speichert alle Dokument in den gleichen Ordner, also auch wenn der Datumswert anderst ist.


Code:

If Dir$("C:\Projekte (Emre)\Dokumente2014\" + strYear , 16) = "" Then
MkDir"C:\Projekte (Emre)\Dokumente2014\" + strYear
   End If
   If Dir$("C:\Projekte (Emre)\Dokumente2014\" + strYear + "\" + strMonth , 16) = "" Then
MkDir"C:\Projekte (Emre)\Dokumente2014\" + strYear + "\" + strMonth
   End If
   Call o.ExtractFile( "C:\Projekte (Emre)\Dokumente2014\" + strYear + "\" + strMonth + "\" + "sAttachmentName" + ".pdf")

Ich hoffe, dass Ihr mir helfen könnt.

ascabg:
Was ist denn sAttachmentName?

Koenntest Du einmal den ganzen Code posten?

Und bitte verwende einmal die entsprechenden Tags, damit es etwas uebersichtlicher wird.
(Code in entsprechende Code-Tags setzen)


Andreas

Emre_1996:
Sub ExportAttachment(o As Variant)

   Dim sAttachmentName As String
   Dim sNum As String
   Dim sTemp As String
   Dim strName As String
   Dim strBetrag As String

   Dim ses As New NotesSession
   Dim db As NotesDatabase
   Dim dc As NotesDocumentCollection
   Dim doc As NotesDocument
   Dim varDate As Variant
   Dim strYear As String
   Dim strMonth As String
   Dim strFolderName As String
   Set db = ses.CurrentDatabase
   Set dc = db.AllDocuments
   Set doc = dc.GetFirstDocument()
   While Not doc Is Nothing
      If IsDate (doc.Date (0)) Then
         varDate = CDat (doc.Date (0))
         strYear = Format (varDate, "yyyy")
         strMonth = Format (varDate, "mm")
      End If
      Set doc = dc.GetNextDocument( doc )
   Wend

   Print "Exporting " & sAttachmentName
   'Save the file
   If(varDate = "") Then
      MkDir"C:\Projekte (Emre)\Dokumente2014\Sonstiges"
   End If
   If Dir$("C:\Projekte (Emre)\Dokumente2014\" + strYear , 16) = "" Then
MkDir"C:\Projekte (Emre)\Dokumente2014\" + strYear
   End If
   If Dir$("C:\Projekte (Emre)\Dokumente2014\" + strYear + "\" + strMonth , 16) = "" Then
MkDir"C:\Projekte (Emre)\Dokumente2014\" + strYear + "\" + strMonth
   End If
   Call o.ExtractFile( "C:\Projekte (Emre)\Dokumente2014\" + strYear + "\" + strMonth + "\" + o.source)

End Sub

Navigation

[0] Themen-Index

[#] Nächste Seite

[*] Vorherige Sete

Zur normalen Ansicht wechseln