A new version of the Macro that puts a box around the equation
Sub LatexITBox() Dim equation As Variant equation = Selection.Formula If (equation <> "") Then ActiveCell.Offset(0, 1).Select ActiveSheet.Pictures.Insert("http://www.codecogs.com/excel.latex?" + equation).Select With Selection.ShapeRange .Fill.Solid .Fill.Transparency = 0# .Top = ActiveCell.Top - (.Height - ActiveCell.Height) / 2 .IncrementLeft 5 .PictureFormat.CropLeft = -2.83 .PictureFormat.CropRight = -2.83 .PictureFormat.CropTop = -2.83 .PictureFormat.CropBottom = -2.83 .Line.Visible = msoTrue .Line.ForeColor.SchemeColor = 23 End With End If End Sub
Login