Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 02-13-2017, 08:29 AM
boxikg boxikg is offline Center all pictures in document Windows 10 Center all pictures in document Office 2016
Novice
Center all pictures in document
 
Join Date: Feb 2017
Posts: 2
boxikg is on a distinguished road
Default Center all pictures in document


Hi, having converted EPUB ebook to DOCX format I want all pictures to be centered (now all pictures are alligned left). I assume this is not so difficult to solve using VBA so any help would be nice.

Thanks in advance. There are so many pictures thus manual change of allignment would be very stupid. Book itself is of size more than 65 MB.
Reply With Quote
  #2  
Old 02-13-2017, 11:05 AM
dwirony dwirony is offline Center all pictures in document Windows 7 64bit Center all pictures in document Office 2003
Advanced Beginner
 
Join Date: Oct 2016
Posts: 49
dwirony will become famous soon enough
Default

Try:

Code:
Sub Centerallpictures()
'
For Each oILShp In ActiveDocument.InlineShapes
    oILShp.Select
    Selection.ParagraphFormat.Alignment = wdAlignParagraphCenter
Next
'
End Sub
Reply With Quote
  #3  
Old 02-14-2017, 01:51 AM
boxikg boxikg is offline Center all pictures in document Windows 10 Center all pictures in document Office 2016
Novice
Center all pictures in document
 
Join Date: Feb 2017
Posts: 2
boxikg is on a distinguished road
Default

It works, thank you very much!
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to center a title within the page margins not the document's margins in word 2013 wondermuse Word 1 12-31-2014 11:32 PM
Center all pictures in document How To Center The Title On a Word Document simon teddy Word 2 11-13-2014 01:56 PM
Center all pictures in document Justify left center and right center on same line DiGug Word 3 10-02-2014 02:43 PM
Center all pictures in document MS Word 2010 Center a document on paper Eddyisrich403 Word 1 03-12-2014 02:09 AM
how do i apply any change to all pictures in one document greenil Word 0 06-18-2013 12:56 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 02:17 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