2004-08-11 21:14:35 +00:00
|
|
|
VERSION 5.00
|
|
|
|
Begin {C62A69F0-16DC-11CE-9E98-00AA00574A4F} ItalicOptions
|
|
|
|
Caption = "Options for Italics"
|
|
|
|
ClientHeight = 1650
|
|
|
|
ClientLeft = 30
|
|
|
|
ClientTop = 480
|
|
|
|
ClientWidth = 7125
|
2004-08-11 21:24:10 +00:00
|
|
|
OleObjectBlob = "ItalicOptions052604.frx":0000
|
2004-08-11 21:14:35 +00:00
|
|
|
StartUpPosition = 1 'CenterOwner
|
|
|
|
End
|
|
|
|
Attribute VB_Name = "ItalicOptions"
|
|
|
|
Attribute VB_GlobalNameSpace = False
|
|
|
|
Attribute VB_Creatable = False
|
|
|
|
Attribute VB_PredeclaredId = True
|
|
|
|
Attribute VB_Exposed = False
|
2004-08-11 21:23:10 +00:00
|
|
|
|
2004-08-11 21:14:35 +00:00
|
|
|
Dim lastChoice As Integer
|
|
|
|
Dim cancelled As Boolean
|
|
|
|
|
|
|
|
|
2004-08-11 21:23:10 +00:00
|
|
|
Public Sub Cancel_Click()
|
2004-08-11 21:14:35 +00:00
|
|
|
cancelled = True
|
|
|
|
ItalicOptions.Hide
|
|
|
|
End Sub
|
|
|
|
|
|
|
|
Private Sub Submit_Click()
|
|
|
|
lastChoice = ItalicOptions.StyleChoices.ListIndex
|
|
|
|
ItalicOptions.Hide
|
|
|
|
End Sub
|
|
|
|
|
|
|
|
Private Sub UserForm_Activate()
|
|
|
|
ItalicOptions.StyleChoices.SetFocus
|
|
|
|
ItalicOptions.StyleChoices.ListIndex = lastChoice
|
|
|
|
cancelled = False
|
|
|
|
End Sub
|
|
|
|
|
|
|
|
Private Sub UserForm_Initialize()
|
|
|
|
StyleChoices.AddItem "Weak Emphasis" 'ListIndex = 0
|
|
|
|
StyleChoices.AddItem "Title" 'ListIndex = 1
|
2004-08-11 21:23:10 +00:00
|
|
|
StyleChoices.AddItem "Chinese Word" 'ListIndex = 2
|
|
|
|
StyleChoices.AddItem "French Word" 'ListIndex = 3
|
|
|
|
StyleChoices.AddItem "German Word" 'ListIndex = 4
|
2004-08-11 21:14:35 +00:00
|
|
|
StyleChoices.AddItem "Japanese Word" 'ListIndex = 5
|
2004-08-11 21:23:10 +00:00
|
|
|
StyleChoices.AddItem "Korean Word" 'ListIndex = 6
|
|
|
|
StyleChoices.AddItem "Nepali Word" 'ListIndex = 7
|
|
|
|
StyleChoices.AddItem "Pali Word" 'ListIndex = 8
|
|
|
|
StyleChoices.AddItem "Sanskrit Word" 'ListIndex = 9
|
|
|
|
StyleChoices.AddItem "Spanish Word" 'ListIndex = 10
|
|
|
|
StyleChoices.AddItem "Tibetan Word" 'ListIndex = 11
|
|
|
|
StyleChoices.AddItem "Page Number" 'ListIndex = 12
|
|
|
|
StyleChoices.AddItem "Page Reference" 'ListIndex = 13
|
|
|
|
StyleChoices.AddItem "Personal Name Human" 'ListIndex = 14
|
|
|
|
StyleChoices.AddItem "Personal Name Other" 'ListIndex = 15
|
|
|
|
StyleChoices.AddItem "Place Name" 'ListIndex = 16
|
|
|
|
StyleChoices.AddItem "Organization Name" 'ListIndex = 17
|
|
|
|
StyleChoices.AddItem "Reference" 'ListIndex = 18
|
|
|
|
StyleChoices.AddItem "Speaker Generic" 'ListIndex = 19
|
|
|
|
StyleChoices.AddItem "Speaker Buddhist Deity" 'ListIndex = 20
|
|
|
|
StyleChoices.AddItem "Speaker Human" 'ListIndex = 21
|
|
|
|
StyleChoices.AddItem "Speaker Other" 'ListIndex = 22
|
|
|
|
StyleChoices.AddItem "Strong Emphasis" 'ListIndex = 23
|
|
|
|
StyleChoices.AddItem "Remove Italics" 'ListIndex = 24
|
2004-08-11 21:14:35 +00:00
|
|
|
End Sub
|
|
|
|
Public Function wasCancelled() As Boolean
|
|
|
|
wasCancelled = cancelled
|
|
|
|
End Function
|
|
|
|
Public Function getSelectedStyle() As Style
|
|
|
|
|
|
|
|
Select Case lastChoice
|
|
|
|
Case 0 ' Weak Emphasis
|
|
|
|
Set getSelectedStyle = ActiveDocument.Styles("Emphasis Weak,ew")
|
|
|
|
Exit Function
|
|
|
|
|
|
|
|
Case 1 ' Title English
|
|
|
|
Set getSelectedStyle = ActiveDocument.Styles("Text Title,tt")
|
|
|
|
Exit Function
|
|
|
|
|
2004-08-11 21:23:10 +00:00
|
|
|
Case 2 ' Chinese Word
|
|
|
|
Set getSelectedStyle = ActiveDocument.Styles("Lang Chinese,chi")
|
2004-08-11 21:14:35 +00:00
|
|
|
Exit Function
|
|
|
|
|
2004-08-11 21:23:10 +00:00
|
|
|
Case 3 ' French Word
|
|
|
|
Set getSelectedStyle = ActiveDocument.Styles("Lang French,fre")
|
2004-08-11 21:14:35 +00:00
|
|
|
Exit Function
|
|
|
|
|
2004-08-11 21:23:10 +00:00
|
|
|
Case 4 ' German Word
|
|
|
|
Set getSelectedStyle = ActiveDocument.Styles("Lang German,ger")
|
2004-08-11 21:14:35 +00:00
|
|
|
Exit Function
|
|
|
|
|
|
|
|
Case 5 ' Japanese Word
|
|
|
|
Set getSelectedStyle = ActiveDocument.Styles("Lang Japanese,jap")
|
|
|
|
Exit Function
|
|
|
|
|
2004-08-11 21:23:10 +00:00
|
|
|
Case 6 ' Korean Word
|
|
|
|
Set getSelectedStyle = ActiveDocument.Styles("Lang Korean,kor")
|
|
|
|
Exit Function
|
|
|
|
|
|
|
|
Case 7 ' Nepali Word
|
|
|
|
Set getSelectedStyle = ActiveDocument.Styles("Lang Nepali,nep")
|
|
|
|
Exit Function
|
|
|
|
|
|
|
|
Case 8 ' Pali Word
|
|
|
|
Set getSelectedStyle = ActiveDocument.Styles("Lang Pali,pal")
|
|
|
|
Exit Function
|
|
|
|
|
|
|
|
Case 9 ' Sanskrit Word
|
|
|
|
Set getSelectedStyle = ActiveDocument.Styles("Lang Sanskrit,san")
|
|
|
|
Exit Function
|
|
|
|
|
|
|
|
Case 10 ' Spanish Word
|
|
|
|
Set getSelectedStyle = ActiveDocument.Styles("Lang Spanish,Spa")
|
|
|
|
Exit Function
|
|
|
|
|
|
|
|
Case 11 ' Tibetan Word
|
|
|
|
Set getSelectedStyle = ActiveDocument.Styles("Lang Tibetan,tib")
|
|
|
|
Exit Function
|
|
|
|
|
|
|
|
Case 12 ' Page Number
|
|
|
|
Set getSelectedStyle = ActiveDocument.Styles("Page Number,pgn")
|
|
|
|
Exit Function
|
|
|
|
|
|
|
|
Case 13 ' Page Refence
|
|
|
|
Set getSelectedStyle = ActiveDocument.Styles("Pages,pg")
|
|
|
|
Exit Function
|
|
|
|
|
|
|
|
Case 14 ' Personal Name Human
|
2004-08-11 21:14:35 +00:00
|
|
|
Set getSelectedStyle = ActiveDocument.Styles("Name Personal Human,nph")
|
|
|
|
Exit Function
|
|
|
|
|
2004-08-11 21:23:10 +00:00
|
|
|
Case 15 ' Personal Name Other
|
2004-08-11 21:14:35 +00:00
|
|
|
Set getSelectedStyle = ActiveDocument.Styles("Name Personal other,npo")
|
|
|
|
Exit Function
|
|
|
|
|
2004-08-11 21:23:10 +00:00
|
|
|
Case 16 ' Place Name
|
2004-08-11 21:14:35 +00:00
|
|
|
Set getSelectedStyle = ActiveDocument.Styles("Name Place,np")
|
|
|
|
Exit Function
|
|
|
|
|
2004-08-11 21:23:10 +00:00
|
|
|
Case 17 ' Organizational Name
|
2004-08-11 21:14:35 +00:00
|
|
|
Set getSelectedStyle = ActiveDocument.Styles("Name organization,nor")
|
|
|
|
Exit Function
|
|
|
|
|
2004-08-11 21:23:10 +00:00
|
|
|
Case 18 ' Reference
|
2004-08-11 21:14:35 +00:00
|
|
|
Set getSelectedStyle = ActiveDocument.Styles("Reference,rf")
|
|
|
|
Exit Function
|
|
|
|
|
2004-08-11 21:23:10 +00:00
|
|
|
Case 19 ' Speaker Generic
|
|
|
|
Set getSelectedStyle = ActiveDocument.Styles("Speaker generic,sg")
|
|
|
|
Exit Function
|
|
|
|
|
|
|
|
Case 20 ' Speaker Buddhist Deity
|
|
|
|
Set getSelectedStyle = ActiveDocument.Styles("SpeakerBuddhistDeity,sb")
|
|
|
|
Exit Function
|
|
|
|
|
|
|
|
Case 21 ' Speaker Human
|
|
|
|
Set getSelectedStyle = ActiveDocument.Styles("SpeakerHuman,sh")
|
|
|
|
Exit Function
|
|
|
|
|
|
|
|
Case 22 ' Speaker Other
|
|
|
|
Set getSelectedStyle = ActiveDocument.Styles("SpeakerOther,so")
|
|
|
|
Exit Function
|
|
|
|
|
|
|
|
Case 23 ' Strong Emphasis
|
2004-08-11 21:14:35 +00:00
|
|
|
Set getSelectedStyle = ActiveDocument.Styles("Emphasis Strong,es")
|
|
|
|
Exit Function
|
|
|
|
|
2004-08-11 21:23:10 +00:00
|
|
|
Case 24 ' Remove Italics
|
2004-08-11 21:14:35 +00:00
|
|
|
Set getSelectedStyle = ActiveDocument.Styles("Normal,no")
|
|
|
|
Exit Function
|
|
|
|
|
|
|
|
Case Default
|
|
|
|
Set getSelectedStyle = ActiveDocument.Styles("Emphasis Weak,ew")
|
|
|
|
|
|
|
|
End Select
|
|
|
|
|
|
|
|
End Function
|