Because Draw serves up the wrong thumbnail in Windows Explorer* I need a macro to set the page size to all objects in the document .
Google found me some in here and I tried them but each one puts the page offset from 0,0 bottom left, even this one from Sub GDG_John( ) Option ExplicitSub fitCanvas() Dim s As Shape Dim w As Double, h As Double Set s = ActiveSelection If s.Shapes.Count = 0 Then MsgBox "Please make a selection" Exit Sub End If s.GetSize w, h ActivePage.SizeHeight = h ActivePage.SizeWidth = w ActiveDocument.ReferencePoint = cdrBottomLeft s.SetPosition 0, 0End SubSo anyone any ideas how I can make this work correctly so that the page correctly encompasses all objects? Ideally I don't want to SelectAll first either.TIA* I argued the toss about this on many occasions whilst I was a beta tester but got nowhere. CorelDraw stores two thumbnails minimum, one for Page1 and one called Thumbnail. For each extra page you get an additional thumbnail. In explorer the default is Page1 thumbnail which only shows what it on the page whereas Thumbnail displays all objects on the desktop. I couldn't give a fig about the page contents for drawings that are drawn at actual life size, but there is no way of making Draw serve up the Thumbnail.jpg. I argued that if the page border was not on display then the all objects thumbnail should be shown.
hywelharris said:I need a macro to set the page size to all objects in the document
We've had the debate about pages too many times Hywel, so I won't go there again. There's one thing I would like to add though: The reason your objects don't show in the thumbnail is probably because they are on the Desktop layer, which by default is non-printable.Even though Eskimo's macro is excellent (use it all the time) you could most likely work around the problem by enabling "Print and Export" for the Desktop layer.Unfortunately, you cannot solve it by simply move all objects to a printable layer, because they will be moved back to the Desktop once you save or switch page, due to the "automatically-move-all objects-outside-the-drawing-area-to-Desktop" issue, an issue that was fixed (made optional) in Draw 2019.
Unfortunately Ronny, there is a problem with Draw in that you cannot move the page. So that solution cannot work for me. It will always reside at the original, unedited document origin. All you can do is move the ruler origin which is not the same thing. Hence all the macros to create a page of a size equal to all objects results in the objects moving to the page, which for me can't happen as the objects are drawn to guidelines.
The objects do show in the thumbnails, but in the wrong one!. As I mentioned Draw saves two thumbnails as a minimum, one for Page 1 and one for all objects.
WIndows will use the all objects thumbnail in all views apart from list and details, however its not large enough unless you use large or extra large . The issue is in list view and the preview pane. Draw will always show the page thumbnail view which doesnt help when in list view so I have to keep toggling between list and extra large to find the file I need, not convenient or fast. I want to see the all objects thumbnail at all times.
The desktop issue is not an issue to me as all objects go on Layer 1 (2,3,n) Never on the desktop layer and Draw does not move them to the desktop layer unless you have more than one physical page.I used to think it came into play when you display the page border, but its doesn't. So Draw is being quite logical here, in the the desktop layer thing comes into play when more than one page is used, but when it serves up the preview in Windows it should apply the same logic , but it doesn't. It still displayes the page contents even whe the page isn't relevant and it forces me to have to go through far too many steps to find my files.
This was never too much of a problem when ThumbsPlus was working well, but it appears to be no longer supported and won't function correctly in Windows 11.
hywelharris said:The desktop issue is not an issue to me as all objects go on Layer 1 (2,3,n) Never on the desktop layer and Draw does not move them to the desktop layer unless you have more than one physical page.
Oh, so the Draw 2018 thumbnails do not show objects outside the drawing area even if they are on a printable layer?In Draw 2021, which I used for my tests, all objects are shown as long as they are on a printable layer, no matter where they are positioned.Have you considered upgrading?I think we have talked about this in the past but why not use maximum page size (45,720 x 45,720 mm)?That way you will most likely (even though you prefer not to show the page frame) have all objects inside the page, and drastically reduce the risk of "disappearing" objects.Or, and I know we have talked about this , why not use Draw the way it is designed to work best, with a specified drawing area and a visible page frame where you work and put all your objects?