Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 01-05-2013, 10:12 AM
sumjoh sumjoh is offline Convert equation objects to inline objects Windows 7 32bit Convert equation objects to inline objects Office 2007
Novice
Convert equation objects to inline objects
 
Join Date: Jan 2013
Posts: 1
sumjoh is on a distinguished road
Post Convert equation objects to inline objects


Hi, I'm using the following macro to convert floating equation objects that appear as display equations (not run on with text) to inline objects

Code:
Sub ConvertToInline()
Dim i As Integer
For i = ActiveDocument.Shapes.Count To 1 Step -1
  Select Case ActiveDocument.Shapes(i).Type
    Case msoEmbeddedOLEObject, msoLinkedOLEObject, msoLinkedPicture, msoOLEControlObject, msoPicture, _
      wdInlineShapePicture, wdInlineShapeLinkedPicture: ActiveDocument.Shapes(i).ConvertToInlineShape
  End Select
Next i
End Sub
The macro seems to work fine, but after conversion the text that precedes some of the equations are run on at the end of the equations, which is not what I want. I need the equations to remain on separate lines by themselves (i.e. as display equations).

Can someone help with this?

Last edited by macropod; 01-29-2013 at 08:26 PM. Reason: Added code tags & formatting
Reply With Quote
  #2  
Old 01-29-2013, 08:38 PM
macropod's Avatar
macropod macropod is online now Convert equation objects to inline objects Windows 7 64bit Convert equation objects to inline objects Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Hi sumjoh,

When a floating shape is converted to in-line, its position on the page is determined by the position of the shape's anchor prior to conversion. Thus, if the anchor is at the start of a paragraph (which is the default), the in-line shape will be positioned at the start of that paragraph. Accordingly, you'll need to move the anchor before converting, or the in-line shape after converting.

Also, since wdInlineShapePicture and wdInlineShapeLinkedPicture are already in-line, you can't convert them to that wrap format. Those references may as well be deleted.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply

Tags
equations, floating objects, inline objects

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert equation objects to inline objects Can't Shift Objects Off Sheet - What is that? namedujour Excel 5 05-13-2011 06:30 AM
Shrinking objects in powerpoint lrae PowerPoint 0 03-01-2011 10:36 AM
Convert equation objects to inline objects Shape Objects Space Cowboy PowerPoint 4 10-04-2010 07:14 PM
NOprintable objects shadowbat Drawing and Graphics 0 07-05-2010 10:13 PM
Group objects in Office Alfie Drawing and Graphics 3 04-16-2009 10:24 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 06:30 AM.


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