Adding Files to PST in Jython
Contents
[
Hide
]
Aspose.Email - Adding Files to PST
To Add File to PST using Aspose.Email Java for Jython, simply invoke AddFileToPST module. Here you can see example code.
Jython Code
from aspose-email import Settings
from com.aspose.email import PersonalStorage
from com.aspose.email import FileFormatVersion
from com.aspose.email import StandardIpmFolder
class AddFileToPST:
def __init__(self):
dataDir = Settings.dataDir + 'ProgrammingOutlook/WorkingWithOutlookPersonalStorage/AddFileToPST/'
personalStorage=PersonalStorage()
fileFormatVersion=FileFormatVersion
pst = personalStorage.create(dataDir + "AddFile1.pst", fileFormatVersion.Unicode)
standardIpmFolder=StandardIpmFolder
fi = pst.createPredefinedFolder("Inbox", standardIpmFolder.Inbox)
fi.addFile(dataDir + "Report.xlsx", "IPM.Document.Excel.Sheet.8")
pst.dispose()
print "Added file to PST"
if __name__ == '__main__':
AddFileToPST()
Download Running Code
Download Adding Files to PST (Aspose.Email) from any of the below mentioned social coding sites: