Question

Is it possible to get all files (ex : jpg images) from a particular folder with out using openfiledialog method in lotus script? In lotus script, we can give the file path as hard coded.

Was it helpful?

Solution

You can use Dir to get all files from a folder:

Dim pathName As String
Dim fileName As String
pathName = "C:\yourFolder\"
fileName = Dir(pathName + "*.jpg", 0)
Do While fileName <> ""
    Print pathName + fileName
    fileName = Dir()
Loop

This sample code prints all your jpg files from yourFolder like

C:\yourFolder\a.jpg
C:\yourFolder\b.jpg
C:\yourFolder\c.jpg

From there you can use the list to attach the files to a document or whatever you want to do with the files.

Here you can find the description.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top