OberonPlace.com Forums  

Go Back   OberonPlace.com Forums > Developer Forums > VBA > Corel Photo-Paint VBA

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 29-12-2003, 19:39
Gerry Hickman
Guest
 
Posts: n/a
Default COM/OLE Automation

Hi,

I'm trying to control PhotoPaint v9 from an external app using COM/OLE. This works perfectly in CorelDraw v9, but NOT in PhotoPaint.

CorelDraw has an APPID (ProgID) called "CorelDraw.Application.9", but PhotoPaint does not have this.

It makes no difference which language I use, I've tried JScript, C#.NET and C++, but get the same results.

There's a ProgID called "CorelPhotoPaint.Automation.9", but I've been unable to work out what this is for.

A simple example of what I want to do, is open an instance of PhotoPaint from C++, get it's version and then close it again. As I say, this is fine in Draw, but not in Paint.
Reply With Quote
  #2  
Old 30-12-2003, 14:45
Alex's Avatar
Alex Alex is offline
Administrator
 
Join Date: Nov 2002
Posts: 1,941
Blog Entries: 4
Default Re: COM/OLE Automation

Gerry,

PhotoPaint should have a similar AppID: CorelPhotoPaint.Application.9

If it doesn't, I'd suspect you have a corrupt installation. But I cannot be 100% certain as it was long time ago.

CorelPhotoPaint.Automation.9 is the CorelScript automation object. This is the same automation interface exposed to the CorelSCRIPT.

CorelPhotoPaint.Application.9 on the other hand is the VBA automation interface.

The whole VBA object model for PP9 is outlined here: http://www.oberonplace.com/vba/paint9vba.htm

The CorelScript object is exposed through the VBA object model as well. It has just a set of methods. You can see them here: http://www.oberonplace.com/vba/paint...tm#CorelScript

I hope this helps.
Reply With Quote
  #3  
Old 02-01-2004, 19:31
Gerry Hickman
Guest
 
Posts: n/a
Default Solved!

Hi,

Turns out this was fixed in CD9 SP1. After installing SP1, the reg keys for the App IDs appear the first time PhotoPaint is run.

It now works fine from COM client apps.
Reply With Quote
Reply


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
save filename without extension and prn automation error olympiatr CorelDRAW/Corel DESIGNER VBA 5 20-10-2004 08:17
Batch file automation in PhotoPAINT. Please help. vallentin Corel Photo-Paint VBA 0 14-04-2004 12:48
Photo-Paint 11 Automation error ... Allan Shearer Corel Photo-Paint CS 1 15-09-2003 17:28


All times are GMT -5. The time now is 03:49.


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