06-29-2022
12:22 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
06-29-2022
12:22 PM
If you want both the .stp and the .pdf file in the same directory and with the same filename (except for extension), you can still use the result from the first FileDialog you use. You just have to change the extension of the save file, which is fairly easy to do. In your PDF section, instead of
'Set the PDF target file name oDataMedium.FileName = ExportPath & ExportFilename
use this:
'Set the PDF target file name
oDataMedium.FileName = System.IO.Path.GetFileNameWithoutExtension(dialog.FileName)&".pdf"