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 21-03-2003, 15:37
CORNMEN
Guest
 
Posts: n/a
Default Copying objects to clipboard then closing document.

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
Reply With Quote
  #2  
Old 21-03-2003, 21:38
Alex's Avatar
Alex Alex is offline
Administrator
 
Join Date: Nov 2002
Posts: 1,938
Blog Entries: 4
Default Re: Copying objects to clipboard then closing document.

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)?
Reply With Quote
  #3  
Old 24-03-2003, 10:03
CORNMEN
Guest
 
Posts: n/a
Default Re: Copying objects to clipboard then closing document.

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
Reply With Quote
  #4  
Old 25-03-2003, 21:09
Alex's Avatar
Alex Alex is offline
Administrator
 
Join Date: Nov 2002
Posts: 1,938
Blog Entries: 4
Default Re: Copying objects to clipboard then closing document.

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.
Reply With Quote
  #5  
Old 31-03-2003, 10:52
CORNMEN
Guest
 
Posts: n/a
Default Re: Copying objects to clipboard then closing document

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
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
How to get objects from another opened corel document ama CorelDRAW/Corel DESIGNER VBA 12 24-02-2004 08:11
I need to update objects visibility faster NEHovis Corel Photo-Paint VBA 0 18-07-2003 08:54
Active document issues.. wbochar CorelDRAW/Corel DESIGNER VBA 2 19-03-2003 16:15


All times are GMT -5. The time now is 14:10.


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