Changing Default Folder for Exporting 
Author Message
 Changing Default Folder for Exporting

We use VB6 application based on CRPE32.dll (see below samples of
code). We can successfully export report, after it is being shown, to
all specified formats.

When we click on Export button, we see common dialog box, where user
can specify destination directory for the file being exported. User
can change
this directory, all exporting functionality works ok.

However default directory, that user can see in Common Dialog control
usually is: C:\Window\Temp

Is it possible to CHANGE the default export directory to any other
(for example: C:\Temp) folder?
It would be more convenient for user not to change the output folder
each time (and not to browse to windows directory each time.

Thanks in advance for the answer!

Alexei Akimov
tel: 416-777-9377 ext.332
VB, SQL Server, ASP, Crystal Developer

Once again: for a number of reasons we do not programmatically export
report (i.e. we do not use .export method of report object). We use
export button in Crystal Report viewer after the report is being

I know that comdlg32.ocx has .InitDir property, that allows to specify
the default directory for common dialog save file, however we do not
instantiate comdlg32.ocx from VB code, it  is instantiated from
CRPEAuto.dll (i.e. one dll written in C calles another dll).

CRRPEAuto.dll does not expose any "default export folder" properties.
We can programmatically export to any specified file (including full
path), but still it does not change the default export folder for
manual export.

attachment: samples of code:

Public goCrystalApplication As CRPEAuto.Application
Public goCrystalReport As CRPEAuto.Report
            Call goCrystalApplication.LogOnServer("pdsodbc", "CORE",
"", "coreuser", "sreilloc")
            Set goCrystalReport =
    'get view ojbect of preview and pass to crystal form
    Set oView = oReport.Preview("", , , , , CW_SYSMENU Or CW_BORDER Or
    Set frmCrystal.View = oView

Sat, 08 May 2004 03:40:02 GMT  
 [ 1 post ] 

 Relevant Pages 

1. Export default folder

2. Saving Contacts - Changing the Default Folder

3. Changing default folder location

4. How to change default folder for contact button on form

5. Change the Default Link Items folder

6. Can I change the default icon for an Outlook Folder

7. 2nd Post - Changing Folders Default Icon

8. Changing the Outlook folder's default message class by VB6.0

9. Changing the default project file folder...

10. Add contact information to folder other than default folder

11. create a folder or find default temp folder

12. Outlook View control - accessing folders other than Default Folder


Powered by phpBB® Forum Software