OberonPlace.com Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 22-02-2006, 17:13
shelbym's Avatar
shelbym shelbym is offline
Senior Member
 
Join Date: Nov 2002
Location: Cheyenne, WY
Posts: 1,770
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 CorelDRAW X3 DocumentOpen Problem

Alex and others,

Anyone having problems with the DocumentOpen event? Here is a simple example.

Code:
Private Sub GlobalMacroStorage_DocumentOpen(ByVal doc As Document, ByVal FileName As String)
Dim s As Shape
    
For Each s In ActiveDocument.ActivePage.Shapes
    s.Fill.UniformColor.RGBAssign 255, 0, 0
Next s

End Sub
The code runs fine, but then I get a dialog asking if I want to revert to the saved version. Anyone know why I would get this dialog? Looks like it may be a bug. ARUGH.

Any workaround would also be great. This is causing problems with several of my macros.

Thanks for the help,

Shelby
Reply With Quote
  #2  
Old 22-02-2006, 17:20
shelbym's Avatar
shelbym shelbym is offline
Senior Member
 
Join Date: Nov 2002
Location: Cheyenne, WY
Posts: 1,770
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 Workaround

Thinking about it I added this line:

ActiveDocument.Dirty = False

This prevents the message and is a nice workaround. Anyother ideas would also be welcome. Thanks,

Shelby
Reply With Quote
  #3  
Old 22-02-2006, 20:29
Alex's Avatar
Alex Alex is offline
Administrator
 
Join Date: Nov 2002
Posts: 1,940
Blog Entries: 4
Default

Well, I have to look into this. However I'd suggest you to use the document passed in as the parameter of the event, rather than relying on it to be the current active document.
Reply With Quote
  #4  
Old 23-02-2006, 12:52
shelbym's Avatar
shelbym shelbym is offline
Senior Member
 
Join Date: Nov 2002
Location: Cheyenne, WY
Posts: 1,770
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 Document

Now that would be a good idea. But it still produces the same results. I changed my example to the following:
Code:
For Each s In doc.ActivePage.Shapes
    s.Fill.UniformColor.RGBAssign 255, 0, 0
Next s
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
Problem with CopyToIllustrator macro under CorelDRAW X3 Soloway Macros/Add-ons 12 18-03-2006 22:05
HPGL export problem Anonymous General 1 16-02-2006 09:15
Strange CorelDraw Problem With Photoshop riven2000 General 8 03-02-2006 10:53
coreldraw 12 resolution problem chris_t46 CorelDRAW/Corel DESIGNER VBA 2 27-05-2004 00:27
takes Draw a long time to start a new document! bbolte CorelDRAW/Corel DESIGNER VBA 5 14-05-2003 09:09


All times are GMT -5. The time now is 19:38.


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