home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 1998 October A
/
Pcwk10a98.iso
/
Lotus
/
LOTUS
/
WORDPRO
/
SCRIPTS
/
MENU.LSS
< prev
next >
Wrap
Text File
|
1998-05-12
|
7KB
|
260 lines
Option Public
Sub Main
End Sub
Sub Explore
Dim TaskId As Integer
TaskId% = Shell("Explorer",1)
End Sub
Sub Revert
Dim DocName As String
Dim DocPath As String
DocPath = .ActiveDocument.Path
If DocPath = "" Then
Msgbox(|This document has not been modified, nor ever been saved.
Revert to Saved is not possible.|)
Else
DocName = .ActiveDocument.Name
DocPath = .ActiveDocument.Path
.ActiveDocument.Close(0)
.OpenDocument(DocPath & "\" & DocName)
End If
End Sub
Sub U_Case
Dim RetSC As Integer
Dim RetLCase As Integer
RetSC = .Text.Font.SmallCaps
RetLCase = .Text.Font.LowerCase
If RetSC = True Then
.Text.Font.SmallCaps = False
End If
If RetLCase = True Then
.Text.Font.LowerCase = False
End If
.UpperCase
End Sub
Sub L_Case
Dim RetSC As Integer
Dim RetUCase As Integer
RetSC = .Text.Font.SmallCaps
RetUCase = .Text.Font.UpperCase
If RetSC = True Then
.Text.Font.SmallCaps = False
End If
If RetUCase = True Then
.Text.Font.UpperCase = False
End If
.LowerCase
End Sub
Sub SmallCaps
Dim RetSC As Integer
Dim RetUCase As Integer
Dim RetLCase As Integer
RetSC = .Text.Font.SmallCaps
RetUCase = .Text.Font.UpperCase
RetLCase = .Text.Font.LowerCase
If RetUCase = True Then
.Text.Font.UpperCase = False
End If
If RetLCase = True Then
.Text.Font.LowerCase = False
End If
If RetVal = True Then
.Text.Font.SmallCaps = False
Else
.Text.Font.SmallCaps = True
End If
End Sub
Sub MUOpts
Const ML_RevMarkOptions = 461
.wmcommand(ML_RevMarkOptions)
End Sub
Sub StyleSave
Dim LastLPath, LastDPath, StyPath, DocPath, TempLPath, TempDPath As String
Dim WkDir, WKType, WDTemp, WTTemp As Integer
WkType = .ApplicationWindow.UserInterfacePrefs.WorkingType
WTTemp = WkType
LastLPath = .ApplicationWindow.UserInterfacePrefs.LastDocPath
LastDPath = .ApplicationWindow.UserInterfacePrefs.DocPath
StyPath = .ApplicationWindow.UserInterfacePrefs.StylePath
TempLPath = LastLPath
TempDPath = LastDPath
.ApplicationWindow.UserInterfacePrefs.LastDocPath = StyPath
.ApplicationWindow.UserInterfacePrefs.DocPath = StyPath
.ApplicationWindow.UserInterfacePrefs.WorkingType = False
.SaveAs ,,"Lotus Word Pro SmartMaster",False,False,False
.ApplicationWindow.UserInterfacePrefs.LastDocPath = TempLPath
.ApplicationWindow.UserInterfacePrefs.DocPath = TempDPath
.ApplicationWindow.UserInterfacePrefs.WorkingType = WTTemp
End Sub
Sub Script_Tools
Dim BarShowing As Integer
Dim ScriptBar As IconBar
Set ScriptBar = .ApplicationWindow.IconBarManager.IconBars("Script Tools")
BarShowing = ScriptBar.IsShowing
If BarShowing = False Then
ScriptBar.ShowInContext = True
ScriptBar.Show
Else
ScriptBar.ShowInContext = False
ScriptBar.HideIconBar
End If
End Sub
Sub Tabs
Const LwpMenuMtabSettabs = 855
.wmcommand(LwpMenuMtabSettabs)
End Sub
Sub Labels
Dim StyPath As String
StyPath = .ApplicationWindow.UserInterfacePrefs.StylePath
.NewDocument "", "", StyPath & "\label.mwp", "", "", ""
.ActiveDocument.DivisionInfo.ClassName = "Microsoft Word"
End Sub
Sub Text_Tools
Dim BarShowing As Integer
Dim TextBar As IconBar
Set TextBar = .ApplicationWindow.IconBarManager.IconBars("Text")
BarShowing = TextBar.IsShowing
If BarShowing = False Then
TextBar.ShowInContext = True
TextBar.Show
Else
TextBar.ShowInContext = False
TextBar.HideIconBar
End If
End Sub
Sub Univ_Tools
Dim BarShowing As Integer
Dim UnivBar As IconBar
Set UnivBar = .ApplicationWindow.IconBarManager.IconBars("Universal")
BarShowing = UnivBar.IsShowing
If BarShowing = False Then
UnivBar.ShowInContext = True
UnivBar.Show
Else
UnivBar.ShowInContext = False
UnivBar.HideIconBar
End If
End Sub
Sub GridLines
Dim GrdLines As Integer
GrdLines = .ActiveDocWindow.WinViewPrefs.IsViewTableGridLines
If GrdLines = False Then
.ActiveDocWindow.WinViewPrefs.IsViewTableGridLines = True
Else
.ActiveDocWindow.WinViewPrefs.IsViewTableGridLines = False
End If
End Sub
Sub Hidden_Text
Dim HidnText As Integer
HidnText = .Division.DivisionOptions.ShowHiddenText
If HidnText = False Then
.Division.DivisionOptions.ShowHiddenText = True
Else
.Division.DivisionOptions.ShowHiddenText = False
End If
End Sub
Sub View_Returns
Dim ViewRtrns As Integer
Dim ViewTabs As Integer
ViewRtrns = .ActiveDocWindow.WinViewPrefs.IsViewReturns
ViewTabs = .ActiveDocWindow.WinViewPrefs.IsViewTabs
If ViewRtrns = False Or ViewTabs = False Then
.ActiveDocWindow.WinViewPrefs.IsViewReturns = True
.ActiveDocWindow.WinViewPrefs.IsViewTabs = True
Else
.ActiveDocWindow.WinViewPrefs.IsViewReturns = False
.ActiveDocWindow.WinViewPrefs.IsViewTabs = False
End If
End Sub
Sub FName
.InsertDocInfo $LwpDocVarFilename
End Sub
Sub PathFile
.InsertDocInfo $LwpDocVarPath
.Type"\"
.InsertDocInfo $LwpDocVarFilename
End Sub
Sub FE_Opts
Const LwpMenuMeFootopts = 171
.wmcommand(LwpMenuMeFootopts)
End Sub
Sub Graphics
Dim Graphics As Integer
Graphics = .ActiveDocWindow.WinViewPrefs.IsViewPictures
If Graphics = False Then
.ActiveDocWindow.WinViewPrefs.IsViewPictures = True
Else
.ActiveDocWindow.WinViewPrefs.IsViewPictures = False
End If
End Sub
Sub Table_Head
Dim Table_Head As Integer
Table_Head = .ActiveDocWindow.WinViewPrefs.IsViewTableHeadings
If Table_Head = False Then
.ActiveDocWindow.WinViewPrefs.IsViewTableHeadings = True
Else
.ActiveDocWindow.WinViewPrefs.IsViewTableHeadings = False
End If
End Sub
Sub HighLite
.HighlightToggle
End Sub
Sub BarCode
Dim PrevFont As String
PrevFont = .Text.Font.FontName
.Text.Font.FontName = "Lotus Postal Barcode"
.Text.MoveToEnd($LwpLocationTypeSelection)
.Text.Deselect
.Text.Font.FontName = PrevFont
End Sub
Sub Initial_Caps
Dim MarkerName As String
MarkerName = .Mark($LWPMarkerTypeDefault)
.Text.MovetoStart $LwpLocationTypeSelection
If .Text.SelectionType <> $LwpSelectionTypeNone Then
.HourGlass(True)
.ApplicationWindow.DarkMode (True)
.Text.MoveToStart($LwpLocationTypeWord)
Call Do_ICaps(MarkerName)
.ApplicationWindow.DarkMode (False)
.HourGlass(False)
End If
End Sub
Sub Do_ICaps(MarkerName As String)
Do While .Text.GetPosition(MarkerName) = 0
If .Text.AtEnd = True Then
Exit Sub
End If
If .Text.AtBeginningOfWord = True Then
.Text.Shade $LwpLocationTypeSelection, $LwpNavigateDirectionRight, 1
If .Text.GetPosition(MarkerName) <> 0 Then
.Text.Deselect
.Text.MoveToStart($LwpLocationTypeWord)
Exit Sub
End If
If .Text.Font.UpperCase = False Then
.UpperCase
End If
End If
.Text.MoveToEnd($LwpLocationTypeWord)
.Type("[Right]")
Loop
End Sub
Sub Clear
.Type("[DEL]")
End Sub
Sub Layout
.ActiveDocWindow.WinViewPrefs.IsInDraft = False
End Sub
Sub Draft
.ActiveDocWindow.WinViewPrefs.IsInOutline = False
.ActiveDocWindow.WinViewPrefs.IsInDraft = True
End Sub
Sub Outline
.ActiveDocWindow.WinViewPrefs.IsInOutline = True
End Sub