OberonPlace.com Forums  

Go Back   OberonPlace.com Forums > Corel User Forums > CorelDRAW > Macros/Add-ons

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 22-07-2005, 11:09
xombie
Guest
 
Posts: n/a
Question Starting PhotoPaint From Draw

Hello All,
when i run this lil snippet, I get presented with an error. It still works though. Anyone know whats going wrong????

<code>
'-------------
Sub TESTOPENCP()
Dim myappid As String, returnvalue
mayappid = Shell("C:\Program Files\Corel\Corel Graphics 12\Programs\CorelPP.exe", 1)
AppActivate myappid
End Sub
'----------------

<code/>
The application and the error pop up at the same time.
Any clues are welcomed.
Thanx, Andy
Reply With Quote
  #2  
Old 22-07-2005, 14:09
shelbym's Avatar
shelbym shelbym is offline
Senior Member
 
Join Date: Nov 2002
Location: Cheyenne, WY
Posts: 1,769
Blog Entries: 10
Send a message via ICQ to shelbym Send a message via AIM to shelbym Send a message via MSN to shelbym Send a message via Yahoo to shelbym
Default Error Message

The error message I got was "variable not defined". That is because you have myappid spelled as mayappid. Fixed that and it works fine.

Also you may want to look here:
http://forum.oberonplace.com/showpos...94&postcount=2

This example shows how you can test to see if the application is already running. Might help.

Thanks,

Shelby
Reply With Quote
  #3  
Old 23-07-2005, 20:13
xombie
Guest
 
Posts: n/a
Talking Thanx

Shelby, thankyou. The link you provided gave me some valuable insight. However, Yes I did make an error in my spelling. Strangely did not affect anything. The AppActivate command seems to be the trouble. It still Gave me an error after I checked spelling. Anyway.... I looked further and found that negating the .....AppActivate myappid..... altogether, seemed to work.
weird??!
Anyway, Thankyou. again
Andy
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
Attributes in Corel Draw dueless CorelDRAW/Corel DESIGNER VBA 8 09-01-2008 06:56
Vector data from Paint to Draw 12? jimmr General 4 26-05-2005 06:24
Photopaint VBA from 12 to 9 tonywong Corel Photo-Paint VBA 2 20-05-2005 11:22
Draw 12 : Printing Problem Hernán General 3 20-09-2004 10:54
Draw 12 VBA: Preliminary changes Alex CorelDRAW/Corel DESIGNER VBA 2 18-10-2003 06:16


All times are GMT -5. The time now is 08:30.


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