OberonPlace.com Forums  

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

Thread Tools Search this Thread Display Modes
Old 16-12-2003, 06:42
Posts: n/a
Default Accesing CorelDraw 10 VBA Object Model without running it


I will explain my problem the best I can.

I've to open, visualice and print CDR archives without opening it directly with CorelDraw. I mean, I need to do this into another aplication, I can't run CorelDraw in my system, but I can install it.

I think I could write a VBA code which accesing the CorelDraw libraries and his Object Model allows me to do that, but always with CorelDraw closed.

Is it possible ? where can find info about it ?

I don't know if I explained correctly, but any question will be wellcome.
Reply With Quote
Old 16-12-2003, 08:35
Alex's Avatar
Alex Alex is offline
Join Date: Nov 2002
Posts: 1,941
Blog Entries: 4
Default Re: Accesing CorelDraw 10 VBA Object Model without running i

It all depends on the definition of an application being running. Strictly speaking, it is NOT possible to use any of the automation interfaces without the server application running. That's just the way it is. Someone just must respond to your request. Methods cannot execute themselves.

However of you look at it from an end-user standpoint, then you can make CorelDRAW run in background so it is not visible to the user and still process your documents.

When you connect to CorelDRAW from another process (such as a stand-alone Visual Basic program), then the first thing Windows does is to find out if CorelDRAW is already running on the system. If it is, then your application just connects to it and everything is as usual. However if CorelDRAW is NOT running, then Windows will start it first. But the difference is that the application is started in background, so you won't see any of its windows, etc. You can process documents, then shut down the application without the user ever knowing that it was launched (unless he is using Task Manager to check what processes are running on the system).

You can, of course, make CorelDRAW visible after it was automatically started. You just need to set the Visible property of the Application object to True:

Dim Draw As Object
Set Draw = CreateObject("CorelDRAW.Application.11")
Draw.Visible = True
This will ensure that CorelDRAW is launched and it is visible. Alternatively, you can hide a running instance of the application by setting the Visible property to False, but that might not be that great of an idea because the user might be confused by the application suddenly disappearing.

I hope this helps. If you have any more questions, please let me know.
Reply With Quote
Old 16-12-2003, 10:59
Posts: n/a

Of course it helps, thanks a lot. At least I notice that it's not possible to do that without CorelDraw running.

It's quite possible that the other way (executing CD10 in background) may be an option. It couldn't be too complicated to open a CDR file, visualize and print it using VBA interfaces, could be?
Reply With Quote
Old 18-12-2003, 09:21
Posts: n/a

Originally Posted by dolmos
It couldn't be too complicated to open a CDR file, visualize and print it using VBA interfaces, could be?
nope, do it all the time.
Reply With Quote
Old 19-12-2003, 02:25
Posts: n/a

It's true it's easy to open and print documents with VBA in CD10, but question is that I want to do it from another application.

I want to design a VBA module (librarie) which provides methods that could be used for another application. Besides CD10 will do the "hard Work" in background I want show the results (the image) in my application.

For example, a simple Form in VB with two commandButtons, one for loading and visualizing the image, and one for printing it. And a "image area" to visualize the CDR archive in.

I'll try to do that if it's possible. Any idea of what VB object could I use to see the CDR image ?
Reply With Quote
Old 19-12-2003, 07:52
Posts: n/a

i've used the internet components to see a gif/jpeg file "thumbnail" that i've exported from the corel doc. outside of that, i don't think it's possible to view the actual corel file.
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
PCX Object Model ddonnahoe CorelDRAW/Corel DESIGNER VBA 6 08-09-2004 15:04
VBA hint to extract CorelDraw images from msWord.doc Henri Socha CorelDRAW/Corel DESIGNER VBA 1 04-04-2003 11:11
Detect if VBA is installed (an answer and a question) reanan CorelDRAW/Corel DESIGNER VBA 3 04-12-2002 14:35
CorelDraw 11 VBA DOM? sdickson CorelDRAW/Corel DESIGNER VBA 2 03-12-2002 15:05

All times are GMT -5. The time now is 11:44.

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