Group: microsoft.public.word.vba.general
From: "Klaus Linke"
Date: Thursday, March 27, 2008 9:48 PM
Subject: Re: Font related

I don't have time to look at the code right now...

If I had to do it with the Symbol font, I'd put tabs after the opening brace
characters, and before the closing brace... probably using a centered tab
for the stuff in between.

OTOH, it would likely be simpler to insert an equation using the equation
editor. It offers lots of different braces, and supports putting vectors or
matrices in them.

Greetings,
Klaus


"kol" wrote:
> Hi Klaus;
>
> This is my(S.R.) and it might not to be the best but it works.
> What I am trying to do is this:
> | a |
> | ---- |
> | b |
> |------ | =
> | c |
>
> My left,right barackets and with my expressions inside, my question was
> shoul I draw my barackets first then write the expressions after or code
> as
> I draw the brackets .
>
> Please be free to make any corrections or re-write the whole thing!
>
> Public Function RBracketW(Optional addHeight As Integer)
> Dim myPara As Object
> Dim xx As Integer
>
> On Error GoTo RBracketW_Error
>
> Set myPara = oWord.Selection.Paragraphs
>
> With oWord.Selection
> oWord.Selection.Font.bold = False
> If addHeight <> 0 Then
> oWord.Selection.InsertSymbol CharacterNumber:=246, Font:="Symbol",
> Unicode:=True
> oWord.Selection.TypeText vbCr
> '/For Each myPara In Selection.Paragraphs
> With myPara.Format
> For xx = 1 To addHeight
> .LineSpacingRule = wdLineSpaceExactly
> .LineSpacing = oWord.Selection.Range.Characters.First.Font.SIZE
> oWord.Selection.InsertSymbol CharacterNumber:=231,Font:="Symbol",
> Unicode:=True
> oWord.Selection.TypeText vbCr
> Next xx
> End With
> '/Next myPara
> oWord.Selection.InsertSymbol CharacterNumber:=248, Font:="Symbol",
> Unicode:=True
> Else
> 'No additional height
> .InsertSymbol CharacterNumber:=246, Font:="Symbol", Unicode:=True
> .Paragraphs.Format.LineSpacingRule = wdLineSpaceExactly
> .Paragraphs.Format.LineSpacing =
> oWord.Selection.Range.Characters.First.Font.SIZE
> oWord.Selection.TypeText vbCr
> .InsertSymbol CharacterNumber:=248, Font:="Symbol", Unicode:=True
> End If
> End With
> oWord.Selection.Font.bold = False
>
> On Error GoTo 0
> Exit Function
>
> RBracketW_Error:
>
> MsgBox "Error " & Err.Number & " (" & Err.Description & ") in procedure
> RBracketW of Module qstrGen2"
> Resume Next
> End Function
>
> Regards
>
> Kol

Safety Articles | Usenet Groups | Usenet News | Bluegrass