OberonPlace.com Forums  

Go Back   OberonPlace.com Forums > Developer Forums > VBA > CorelDRAW/Corel DESIGNER VBA

Thread Tools Search this Thread Display Modes
Old 30-06-2003, 01:28
Posts: n/a
Default quick export in vc++

Hi, how can i quick export a document to PLT.

Currently i use this code
IStructExportOptionsPtr pExportOptions;
pExportOptions = new IStructExportOptionsPtr(CLSID_StructExportOptions);
hr = m_pCorelDrawDoc->Export(szFilename, cdrPLT, cdrCurrentPage, pExportOptions);
It works well, but corel shows the HPGL-export dialog, it would be fine without the dialog.

How can i do that?


Reply With Quote
Old 10-07-2003, 15:45
Alex's Avatar
Alex Alex is offline
Join Date: Nov 2002
Posts: 1,940
Blog Entries: 4
Default Re: quick export in vc++


I tried this in VBA of CorelDRAW 11.693 and CorelDRAW 10.429 and in both cases the file was created with no dialogs showing:

ActiveDocument.Export "C:\temp\1.plt", cdrPLT, cdrCurrentPage
Can you try the above code in your VBA and see if it runs? Just curious if the problem is because you are calling the method from C++ (out-of-process) or something else.

Let me know how it goes.
Reply With Quote
Old 11-07-2003, 04:05
Posts: n/a
Default thanks alex

I found the problem, it was in the BSTR string it was bad allocated. I changed the BSTR szFilename to CString and i used the AllocSysString() function. My fault.

If the filename is corrupt then the corel shows the export dialog.
Reply With Quote

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
CorelDraw 10 DXF export relative coordinates - VBA solution? asb617 CorelDRAW/Corel DESIGNER VBA 2 01-04-2010 02:34
HPGL export problem Anonymous General 1 16-02-2006 09:15
Problem with Export (or Save as) in AI-Format LOT CorelDRAW/Corel DESIGNER VBA 3 10-02-2004 14:28
Example for Gif Export adriano Corel Photo-Paint VBA 1 10-04-2003 20:03
Export for Web adriano Corel Photo-Paint VBA 1 10-04-2003 19:48

All times are GMT -5. The time now is 04:55.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.
Copyright © 2011, Oberonplace.com