![]() |
#1
|
|||
|
|||
![]()
Hello,
I'm attempting to open a document, copy the contents and then close the document. The problem is when I do this I get a message asking if I want to "Leave data on clipboard for other applications?" Is there a way to suppress this message? My code is below Thanks for your help. Mike Code:
Dim app As CorelDRAW.Application Dim doc As CorelDRAW.Document Dim s As Shape Dim n As Long Set app = CreateObject("coreldraw.application.11") ', "serv") Set prn = Nothing Set doc = app.OpenDocument("\\serv\jpg\" & ArtFileName & ".cdr") doc.ActivePage.Shapes.All.Copy doc.Close Set app = Nothing |
#2
|
||||
|
||||
![]()
Make,
That's a good one. Sorry, I don't think there is a way around this message except for replacing copying the objects with something else. Why do you need to copy the objects to the clipboard? Maybe you can do without it (e.g. by exporting/importing files instead)? |
#3
|
|||
|
|||
![]()
Alex,
I was hoping copying to the clipboard would work, but importing into coreldraw is a viable option although not preferred. We've been copying and pasting art into an access database ole field for 8 years. I'm changing the system to save the files now outside of the database, but was hoping not to change the system too much from what we've been doing. Thanks for your help. Mike |
#4
|
||||
|
||||
![]()
Hey, here is an idea. Why not copy the objects, paste them into the Access database, then clear clipboard and only then close the document in CorelDRAW. This should work, I guess.
You can use Application.Clipboard.Clear just before Document.Close. Let me know if this solution is OK for your needs. |
#5
|
|||
|
|||
![]()
Alex,
Thanks for the suggestion. Unfortunately, the way things were, after copying the user could paste into another coreldraw document, an email, or any other program. I've changed the system a bit to compensate, and I kindof like it better than the old system now. Now when the user clicks the copy button, a list of open corelDraw documents comes up. The user can click on which document they would like to bring the art into or they can choose to bring it into a new document. The code then imports the art into the specified document and brings the document to the front. The user takes it from there. In the past, 99% of the time the user was pasting into coreldraw anyway. Thanks for the help, this site is a great source of info and ideas. Mike |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to get objects from another opened corel document | ama | CorelDRAW/Corel DESIGNER VBA | 12 | 24-02-2004 07:11 |
I need to update objects visibility faster | NEHovis | Corel Photo-Paint VBA | 0 | 18-07-2003 07:54 |
Active document issues.. | wbochar | CorelDRAW/Corel DESIGNER VBA | 2 | 19-03-2003 15:15 |