Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 04-30-2019, 05:00 PM
eduzs eduzs is offline Organize shapes Windows 10 Organize shapes Office 2010 32bit
Expert
Organize shapes
 
Join Date: May 2017
Posts: 266
eduzs is on a distinguished road
Default Organize shapes

Hi!



I need to arrange shapes so that each figure is on a document page.
The shapes are from JPG which I drag and drop into the document (as inlineshapes).
I started with this code:

Code:
Sub ResizePic()

Dim x As Integer

With ActiveDocument.PageSetup
    .LeftMargin = CentimetersToPoints(1)
    .RightMargin = CentimetersToPoints(1)
    .TopMargin = CentimetersToPoints(1)
    .BottomMargin = CentimetersToPoints(1)
    sWidth = .PageWidth - .LeftMargin - .RightMargin
End With

For x = 1 To ActiveDocument.InlineShapes.Count
    ActiveDocument.InlineShapes(1).Width = sWidth
    ActiveDocument.InlineShapes(1).ConvertToShape
Next x

For x = 1 To ActiveDocument.Shapes.Count
    ActiveDocument.Shapes(x).WrapFormat.Type = wdWrapSquare
Next x

End Sub
After running the macro, I got all the stacked pictures remain in a single-page document, instead of 1 shape per page. I also need that the shapes fit to the document width (resize shape).

Thanks!
__________________
Backup your original file before doing any modification.
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Organize shapes Filter or Lookup Formula to Organize Keywords MKTGCLOUD Excel 8 11-28-2018 07:35 PM
Organize shapes Best way to organize resources Steve. Project 3 05-17-2014 07:07 AM
Organize a shared mailbox with categories remmyMartin Outlook 0 04-03-2013 01:40 PM
Organize Sent mail/items outlookissues Outlook 0 05-13-2012 08:55 AM
organize files userman Excel 13 05-04-2012 03:49 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 09:52 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft