Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / November 2004

Tip: Looking for answers? Try searching our database.

Equation Field (or Equation Editor)

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
VBA_LOONEY - 19 Nov 2004 08:55 GMT
Hello,

I have been trying to programmatically add either an equation field o
using the Equation Editor.

Problem with the Equation Editor is I have only been able to add tex
using "SendKeys" which is not ideal.

I have managed to add an "Equation Field" and I can set the text
however I cannot add carriage returns to the text.  Anyone know how?

What I am after is a field which states:

X  -   Y
______
Z

Can anybody help?

Many Thanks,
Looney

--
Message posted from http://www.ExcelForum.com
Jay Freedman - 20 Nov 2004 13:43 GMT
Hi Looney,

You don't need a carriage return to make that expression with an EQ
field. Use the code
  {EQ \f(X - Y, Z)}

The Equation Editor isn't programmable in VBA except by SendKeys,
which is a horrible kluge, but we're stuck with it.

--
Regards,
Jay Freedman
Microsoft Word MVP         FAQ: http://word.mvps.org

>Hello,
>
[quoted text clipped - 20 lines]
>---
>Message posted from http://www.ExcelForum.com/
macropod - 22 Nov 2004 08:28 GMT
Hi Looney,

You could use something like:

Sub AddEQ()
Dim FldText As String
FldText = "EQ \f(X - Y,Z)"
    Selection.Fields.Add Range:=Selection.Range, Text:=FldText,
PreserveFormatting:=False
End Sub

Cheers

> Hello,
>
[quoted text clipped - 20 lines]
> ---
> Message posted from http://www.ExcelForum.com/

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.