Loop
While
strTemp =
","
And
(Response = vbYes)
If
strTemp =
"}"
Then
(Selection.Delete Unit: = wdCharacter, Count: = 1
Else
Response = MsgBox(
"***0шибка: в конце списка нет }... "
_
+ Msg, Style, Title)
If
Response = vbYes
Then
MyString =
"Yes"
Else
MyString =
"No"
.
End
If
End
If
End
If
Options.PasteSmartCutPaste" = OptPasteSmartCutPaste
End
Sub
Function
Multiplier()
Dim
strTemp
As
String
Dim
Msg, Style, Title, Help, Ctxt, Response, MyString
Msg =
"Хотите продолжить?"
Style = vbYesNo + vbCritical + vbDefaultButton2
Title =
"Очередной множитель: степень простого"
Response = vbYes
strTemp = Selection.Text
Selection.MoveRight Unit: = wdCharacter,
Count: = 1, Extend: = wdExtend
If
strTemp =
"{"
Then
Selection.Delete Unit: = wdCharacter, Count: = 1
Selection.Extend Character: =
","
Selection.MoveLeft Unit: = wdCharacter, Count: = 1,
Extend: = wdExtend
Selection.MoveRight Unit: = wdCharacter, Count: = 1
Count: = l, Extend: = wdExtend strTemp = Selection.Text
If
strTemp =
","
Then
Selection.MoveRight Unit: = wdCharacter, Count: = 1, Extend: = wdExtend
strTemp = Selection.Text
If
strTemp =
"}"
Then
Selection.Delete Unit: = wdCharacter, Count: = 1
Response = MsgBox(
"***0шибка в сомножителе: нет }... "
+ Msg, Style, Title)
If
Response = vbYes
Then
MyString =
"Yes"
Else
MyString =
"No"
End
If
End
If
Else
Response = MsgBox(
"***0шибка в сомножителе: нет,... "
+ Msg, Style, Title)
If
Response = vbYes
Then
MyString =
"Yes"
Else
MyString =
"No"
End
If
End
If
End
If
Multiplier = Response
End
Function
Sub
PowExp()
Dim
strTemp
As
String
Selection..Delete Unit: = wdCharacter, Count: = 1
Selection.Extend Character: =
"}"
Selection.MoveLeft Unit: = wdCharacter, Count: = 1, Extend: = wdExtend
strTemp = Selection.Text
If
strTemp =
"1"
Then
Selection.Delete Unit: = wdCharacter, Count: = 1
With
Selection.Font
.Superscript =
True
End
With
Selection.MoveRight Unit: = wdCharacter, Count: = 1
Selection.Font.Reset
End
If
End
Sub
Sub
BaseRepresent()
Dim
strTemp
As
String
strTemp = Selection.Text
If
Not
MultiplierQ(strTemp)
Then
Selection.InsertBefore
"("
Selection.InsertAfter
")"
End
If
End
Sub
Function
MultiplierQ(strTemp) ret =
True
If
Left(strTemp, 1) =
"-"
Then
ret =
False
MultiplierQ = ret
End
Function