OberonPlace.com Forums  

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

Thread Tools Search this Thread Display Modes
Old 15-05-2007, 10:48
Posts: n/a
Default How run a Macro when open a document?

Hi, There is some way of executing a macro at the moment to open a document?
sorry for my english.
Reply With Quote
Old 15-05-2007, 11:11
Posts: n/a

I think this is done with an event handler. Check page 33 on the VBA manual.
The manual is installed by default in

C:\Program Files\Corel\CorelDRAW Graphics Suite 13\Programs\dvba_pg.pdf

Maybe Alex or woxxom can give you more information on this.
Reply With Quote
Old 15-05-2007, 14:10
wOxxOm's Avatar
wOxxOm wOxxOm is offline
Senior Member
Join Date: Mar 2005
Posts: 836

Macro text is located inside document's VBA project?
or is it in static (ordinary) GMS project?

my knowledge of english is not perfect either, so maybe you need to show dialog to open a document from your macro? or without dialog, just open some document located somewhere?
Reply With Quote
Old 15-05-2007, 18:37
Posts: n/a

If you want to run a macro when you open the document then:

Go into GlobalMacros...CorelDraw Objects... This Document

and paste

Private Sub GlobalDocument_OpenDocument(ByVal Document As IDrawDocument)

End Sub

Anything you put into this sub will run when you open a document.
Reply With Quote
Old 15-05-2007, 21:48
shelbym's Avatar
shelbym shelbym is offline
Senior Member
Join Date: Nov 2002
Location: Cheyenne, WY
Posts: 1,787
Blog Entries: 11
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 One Note

Just remember this only works if you have unchecked the Delay Load VBA under Tools| Customization| Workspace| VBA.

Reply With Quote
Old 16-05-2007, 06:55
Posts: n/a
Default macro

thanks for all i meet all with yours indications.
gracias a todos encontre la solucion con lo que me dijisteis.
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
CD X3 Macro Writing to Excel Spreadsheet JudyHNM Code Critique 5 16-08-2007 09:57
Cannot use Curveworks macros in a user witten macro??? jon46089 CurveWorks 2 02-03-2006 14:18
Document not open... ddonnahoe CorelDRAW/Corel DESIGNER VBA 4 29-10-2004 14:13
New macro to clip curves w.r.t. a border Gerard Hermans Macros/Add-ons 0 09-06-2003 07:50
Active document issues.. wbochar CorelDRAW/Corel DESIGNER VBA 2 19-03-2003 15:15

All times are GMT -5. The time now is 21:06.

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