I wonder whether the loadpicture is executing before the export finishes.
try stepping through the code and only execute the loadpicture line once you can see that the file size of the exporting file is not 0kb. If this is the case then you need to add a delay to the code.
Bookmarks