Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 08-30-2018, 06:40 PM
macropod's Avatar
macropod macropod is offline Is it possible to make a macro for inserting a 'division box?' Windows 7 64bit Is it possible to make a macro for inserting a 'division box?' Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,381
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

Creating such equations with VBA using the equation editor gets fairly complex. See: https://software-solutions-online.co...ing-equations/



A simpler alternative might be to use an EQ field. For example:
Code:
Sub LongDivision()
Dim StrVal As String, Fld As Field
StrVal = Trim(InputBox("Amount to divide"))
Set Fld = ActiveDocument.Fields.Add(Range:=Selection.Range, Type:=wdFieldEmpty, _
  Text:="EQ \s\up6(\f(,\)" & StrVal & "))", PreserveFormatting:=False)
Fld.Code.Text = Trim(Fld.Code.Text)
Set Fld = Nothing
End Sub
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Is it possible to make a macro for inserting a 'division box?' Footnote extraction macro [Why is this macro so slow? / anyway to make it faster?] Le_Blanc Word VBA 10 03-22-2021 11:38 AM
Equations - Bracketed division size Dan110024 Word 0 09-03-2015 11:10 PM
Division by Zero error Nate PowerPoint 1 11-29-2012 10:51 PM
Is it possible to make a macro for inserting a 'division box?' No paragraphs division hbrt Word 1 01-24-2012 05:01 PM
Is it possible to make a macro for inserting a 'division box?' division zero escape? gmyls Excel 2 05-22-2009 02:37 AM

Other Forums: Access Forums

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


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