My current photo editing software (Microsoft PhotoDRaw) has the ability to do this and wondering if I can achieve the same in CorelDraw X5 or PhotoPaint Pro X3. I just reinstalled both and need to start using them since PhotoDraw only work up till Windows XP and I use Virtual Machine to run it.
Here you go. If say I open a new project to any page size of my choice and import any image (any size) into the page. Is there a way I can automatically fit the page to the image size in either CorelDraw X5or PhotoPaint X3? That is, if my default page size is letter (8.5"x11") and I import an image that is 2.2"x5", can I automatically fit the default page to the fit the image at 2.2"x5"? Really very handy too. Can I also do the reverse image to paper size? If I can do either, where do I go?
Try this macro. I tested in X6
Sub itemsToPage() doPageAndItemSizing FalseEnd SubSub pageToItems() doPageAndItemSizing TrueEnd SubSub togglePageBorder() If ActiveDocument.Properties("PageBorder", 1) Then ActiveDocument.Properties("PageBorder", 1) = False Else ActiveDocument.Properties("PageBorder", 1) = True End If Application.FrameWork.Automation.Invoke "77f7f9eb-3e06-4899-9a8b-80d9e2aa68d3"End SubPrivate Sub doPageAndItemSizing(bPgToItem As Boolean) Dim sr As ShapeRange Dim w#, h# Set sr = ActiveSelectionRange If sr.Count = 0 Then MsgBox "Make a selection. Exiting...", vbCritical, "GDG": Exit Sub If Not ActiveDocument.Properties("PageBorder", 1) Then ActiveDocument.Properties("PageBorder", 1) = True Application.FrameWork.Automation.Invoke "77f7f9eb-3e06-4899-9a8b-80d9e2aa68d3" End If If bPgToItem Then sr.GetSize w, h ActivePage.SetSize w, h Else ActivePage.GetSize w, h sr.SetSize w, h End If sr.SetPositionEx cdrBottomLeft, 0, 0End Sub
In reply to Sub GDG_John( ):
Thanks for the Macro you sent me. Honestly, I tried running it but could not. I thought I could with the AutoCAD's LISP experience, but this is a different method. I printed out all the help infor on CoredDraw X5 marcro, but still could not. I added it in the manager but the final extension is different from what the marcro import needs.
Please could you give me more directions on how to use the code you sent me.
Thanks for your time.
In reply to caxtin:
This very short video will give you some basics:
This page will tell you exactly how step by step:
I checked out your tutorial(s) and just like a charm, the code you sent worked well. I love it. I sure will use your tutorials to create other recordings.
However, what I am really looking for is shown in the included video clip. The application I used is Microsoft PhotoDraw which is only compatible till Windows XP which I run on my VMWarre Virtual Machine. I would like to eliminate that from my system is I can use Corel instead.
In the video, the paper fits to the image or image fits to paper (of any size) automatically. Just wondering if it is possible in CorelDraw X5 or PhotoPaint X3.
I kinda figured you would want to leave the image proportional so I was expecting this.
If bPgToItem Then sr.GetSize w, h ActivePage.SetSize w, h Else ActivePage.GetSize w, h sr.SetSize w, h End If
If bPgToItem Then sr.GetSize w, h ActivePage.SetSize w, h Else ActivePage.GetSize w, h sr.SetSize w End If
I didn't test again but that should do it.
I replaced the section as isntructed and got this error:
All I can say is WOW! It works perfectly well to what I am looking for.However, I would please like you to add a function there for me.
When I open a new project with (naturally) a page size, and try any of the functions,the Page Border is turned off. After turning it back on, it stays on all through the project,even after applying either of the Image-To-Page or Page-To-Image along the way.Could you please add a line there to automatically turn the Page Border on or leave it onwhich ever is the case here. Please if you can do that for me, it sure WILL BE greatly appreciated.
In AutoCAD, I can save and re-isntall my LISPs after any possible AutoCAD re-installation.On your web site, I did a search for "Backup" but could not find one. Or I searching for the wrongdiscription. How do I re-install (re-enable) any macros I might have for CorelDraw if I happen tore-install CorelDraw? Playing around in CorelDraw, I found in Macro Manager I can Load and createNew GMS files. Also in Visual Basic window, I can Import or Export other file extensions.I also found I can copy To and save my macro. How about the image (Appearance) used for the marcros'button in the toolbar? Is that automatically backuped also into the GMS file?What would you recommend on the best way to do this.
I have to make some time later to browse throuh as many functions you have there.
Thanks for all your help for me in this macros requsest.- Oka
© Corel Corporation. The content herein is in the form of a personal web log ("Blog") or forum posting. As such, the views expressed in this site are those of the participants and do not necessarily reflect the views of Corel Corporation, or its affiliates and their respective officers, directors, employees and agents. Terms and Conditions / User Guidelines.