-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBW9OLEandDDE.html
947 lines (813 loc) · 43.8 KB
/
BW9OLEandDDE.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
<!-- saved from url=(0047)http://www.bibleworks.com/bw9help/bwh45_OLE.htm -->
<html><head><meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="Generator" content="Microsoft Word 11 (filtered)">
<title>OLE and DDE</title>
<style>
<!--
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin-top:0in;
margin-right:0in;
margin-bottom:0in;
margin-left:.05in;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:Arial;}
h1
{margin-top:0in;
margin-right:0in;
margin-bottom:0in;
margin-left:.05in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:Arial;
font-weight:bold;}
h2
{margin-top:0in;
margin-right:0in;
margin-bottom:0in;
margin-left:.05in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:Arial;
font-weight:bold;}
h3
{margin-top:0in;
margin-right:0in;
margin-bottom:0in;
margin-left:.05in;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:Arial;
font-weight:bold;}
h4
{margin-top:0in;
margin-right:0in;
margin-bottom:0in;
margin-left:.05in;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:Arial;
font-weight:bold;}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{color:purple;
text-decoration:underline;}
p
{margin-top:0in;
margin-right:0in;
margin-bottom:0in;
margin-left:.05in;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:Arial;}
p.indented, li.indented, div.indented
{margin-top:0in;
margin-right:0in;
margin-bottom:0in;
margin-left:.2in;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:Arial;}
p.banner, li.banner, div.banner
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:Arial;}
p.drop2, li.drop2, div.drop2
{margin-top:0in;
margin-right:0in;
margin-bottom:0in;
margin-left:.2in;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:Arial;
color:darkgreen;}
p.drop1, li.drop1, div.drop1
{margin-top:0in;
margin-right:0in;
margin-bottom:0in;
margin-left:.05in;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:Arial;
color:darkblue;}
p.s1, li.s1, div.s1
{margin-top:0in;
margin-right:0in;
margin-bottom:0in;
margin-left:.05in;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:Arial;}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
{page:Section1;}
-->
</style>
<script language="JavaScript" src="./BW9OLEandDDE_files/bwjs.js"></script></head>
<body lang="EN-US" link="blue" vlink="purple" onkeypress="BwOnKeyPress()" onload="BwOnLoad()">
<div class="Section1">
<div>
<table class="MsoNormalTable" border="1" cellspacing="0" cellpadding="0" width="100%" style="width:100.0%;background:#C5E2FF;border:solid #99CCFF 1.0pt">
<tbody><tr>
<td style="border:none;padding:.7pt .05in .7pt .05in">
<h2>68 OLE and DDE</h2>
</td>
<td style="border:none;padding:0in 0in 0in 0in">
<p> </p>
</td>
</tr>
</tbody></table>
</div>
<div>
<p class="MsoNormal" align="right" style="text-align:right"> </p>
<h2><a href="http://www.bibleworks.com/bw9help/bwh45_OLE.htm#OLEandDDE">
<span style="font-size:10.0pt;
font-weight:normal">OLE and Dynamic Data Exchange (DDE)</span></a></h2>
<p class="MsoNormal"><a href="http://www.bibleworks.com/bw9help/bwh45_OLE.htm#DDEEx">A DDE Example</a></p>
<p class="MsoNormal"><a href="http://www.bibleworks.com/bw9help/bwh45_OLE.htm#OLEAutomationEx">An OLE Automation
Example</a></p>
<p class="MsoNormal"><span style="font-weight: 400">
<a href="http://www.bibleworks.com/bw9help/bwh45_OLE.htm#Word2003UnicodeMacros">Word 2003 Unicode Conversion Macros</a></span></p>
<p> </p>
<hr noshade="" color="#CDE6FF">
<h2><a name="OLEandDDE">OLE and Dynamic Data Exchange (DDE)</a></h2>
<h1> </h1>
<p class="MsoNormal">BibleWorks has rudimentary DDE capabilities. They allow you
to fetch BibleWorks verse data and status information from other applications
via DDE links. The available commands are shown below. Each command has a
sample showing how it is used in a Word for Windows macro.</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">BibleWorks can also function as a simple OLE Server. This permits
you to control BibleWorks from any application that supports OLE Automation,
including Word, Excel, Internet Explorer. Using JavaScript you can control
BibleWorks from an HTML file. The commands at the present time are basic and
mirror the DDE functionality in most respects. The examples below show both DDE
and JavaScript (OLE) versions of the commands.</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"><b>Command:</b> GetCurrentVerse</p>
<p class="MsoNormal"><b>Function:</b> Returns a string containing the current
verse reference, preceded by the current version descriptor. For example:
<KJV Rom 8:28></p>
<p class="MsoNormal"><b>Word DDE Example:</b> a$ =
DDERequest(ChanNum,"GetCurrentVerse")<br>
<b>Word OLE Example:</b> a$ = bwObj.GetCurrentVerse()</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"><b>Command:</b> SetVersions</p>
<p class="MsoNormal"><b>Function: </b>Sets the current search version and display
versions. The string sent to BibleWorks should contain a list of version
specifiers, with the search version first. For example you might send the
following: <KJV KJV GNT WTT VUL LXT></p>
<p class="MsoNormal"><b>Word DDE Example:</b> DDEExecute ChanNum,
"SetVersions KJV KJV ASV GNT"<br>
<b>Word OLE Example:</b> bwObj.SetVersions("KJV KJV ASV GNT")</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"><b>Command:</b> GetVersions</p>
<p class="MsoNormal"><b>Function: </b>Returns the current search and display
versions in BibleWorks in the form of a string of version specifiers with the
current search version first. See "SetVersions" above.</p>
<p class="MsoNormal"><b>Word DDE Example:</b> a$ =
DDERequest(ChanNum,"GetVersions");<br>
<b>Word OLE Example:</b> a$ = bwObj.GetVersions()</p>
<p class="MsoNormal"><b> </b></p>
<p class="MsoNormal"><b>Command:</b> GoToVerse</p>
<p class="MsoNormal"><b>Function: </b>Causes BibleWorks to load the specified
verse. It also loads the Browse Window into the Windows Clipboard so that it is
available to the calling application.</p>
<p class="MsoNormal"><b>Word DDE Example:</b> DDEExecute ChanNum, "GoToVerse
Mat 1:1"<br>
<b>Word OLE Example:</b> bwObj.GoToVerse("Mat 1:1")</p>
<p class="MsoNormal"><b> </b></p>
<p class="MsoNormal"><b>Command:</b> Lookup</p>
<p class="MsoNormal"><b>Function:</b> Causes the string following the command to
be looked up in the currently set search version.</p>
<p class="MsoNormal"><b>Word DDE Example:</b> DDEExecute ChanNum, "Lookup moses"<br>
<b>Word OLE Example:</b> bwObj.Lookup("moses")</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"><b>Command:</b> IgnoreErrors</p>
<p class="MsoNormal"><b>Function:</b> Prevents BibleWorks from displaying a
Window when GoToVerse is executed with an invalid verse reference. It has two
Options - TRUE and FALSE.</p>
<p class="MsoNormal"><b>Word DDE Example:</b> DDEExecute ChanNum,
"IgnoreErrors TRUE"<br>
<b>Word OLE Example:</b> bwObj.IgnoreErrors(1)</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"><b>Command:</b> ClipGoToVerse</p>
<p class="MsoNormal"><b>Function:</b> If set to TRUE the GoToVerse option will
also copy the current Browse Window to the system clipboard. It has two
Options - TRUE and FALSE. The default is TRUE.</p>
<p class="MsoNormal"><b>Word DDE Example:</b> DDEExecute ChanNum, "
ClipGoToVerse TRUE"<br>
<b>Word OLE Example:</b> bwObj.ClipGoToVerse(1)</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"><b>Command:</b> AutoQuit</p>
<p class="MsoNormal"><b>Function:</b> If set to TRUE BibleWorks will quit after
all commands have been processed.</p>
<p class="MsoNormal"><b>Word DDE Example:</b> DDEExecute ChanNum, " AutoQuitTRUE"<br>
<b>Word OLE Example:</b> bwObj.AutoQuit(1)</p>
<p class="MsoNormal"> </p>
<hr noshade="" color="#CDE6FF">
<p class="MsoNormal"><a name="DDEEx"><b>A DDE Example</b></a></p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">The following example is a do-nothing Word for Windows Macro
that illustrates how to use the DDE functions. </p>
<p class="MsoNormal"> </p>
<div class="Section1">
<p class="MsoNormal" style="margin-left: 0.5in">Sub MAIN()</p>
<p class="MsoNormal" style="margin-left: 0.5in">Dim a As String</p>
<p class="MsoNormal" style="margin-left: 0.5in">ChanNum =
DDEInitiate("bw900", "Commands")</p>
<p class="MsoNormal" style="margin-left: 0.5in">DDEExecute ChanNum,
"GoToVerse Mat 1:1"</p>
<p class="MsoNormal" style="margin-left: 0.5in">MsgBox "You should be at
Matthew 1:1"</p>
<p class="MsoNormal" style="margin-left: 0.5in">a = DDERequest(ChanNum,
"GetCurrentVerse")</p>
<p class="MsoNormal" style="margin-left: 0.5in">MsgBox "The current verse is
" + a</p>
<p class="MsoNormal" style="margin-left: 0.5in">DDEExecute ChanNum,
"SetVersions KJV KJV ASV BGT"</p>
<p class="MsoNormal" style="margin-left: 0.5in">MsgBox "The current search
version should be KJV."</p>
<p class="MsoNormal" style="margin-left: 0.5in">a = DDERequest(ChanNum,
"GetVersions")</p>
<p class="MsoNormal" style="margin-left: 0.5in">MsgBox a</p>
<p class="MsoNormal" style="margin-left: 0.5in">DDEExecute ChanNum, "Lookup
moses"</p>
<p class="MsoNormal" style="margin-left: 0.5in">MsgBox "I just looked up
Moses"</p>
<p class="MsoNormal" style="margin-left: 0.5in">DDETerminate ChanNum</p>
<p class="MsoNormal" style="margin-left: 0.5in">End Sub</p></div>
<p class="MsoNormal"> </p>
<p class="MsoNormal" style="margin-bottom:12.0pt">The following is another
example that fetches a verse from BibleWorks and inserts it into a Word for
Windows document using DDE.</p>
<div class="Section1">
<p class="MsoNormal" style="MARGIN-LEFT: 0.5in">The following is a Word 2003
Macro:</p>
<p class="MsoNormal" style="MARGIN-LEFT: 0.5in"> </p>
<p class="MsoNormal" style="MARGIN-LEFT: 0.5in">Sub Main()</p>
<p class="MsoNormal" style="margin-left: 0.5in" align=".5IN">ChanNum =
DDEInitiate("bw900", "Commands")</p>
<p class="MsoNormal" style="margin-left: 0.5in" align=".5IN">Verse$ =
InputBox("Enter Reference to Insert:", "BibleWorks")</p>
<p class="MsoNormal" style="margin-left: 0.5in" align=".5IN">DDEExecute
ChanNum, Verse$</p>
<p class="MsoNormal" style="margin-left: 0.5in" align=".5IN">DDETerminate
ChanNum</p>
<p class="MsoNormal" style="margin-left: 0.5in" align=".5IN">Selection.Paste</p>
<p class="MsoNormal" style="MARGIN-LEFT: 0.5in">End Sub</p></div>
<p class="MsoNormal" style="margin-left:.5in"> </p>
<p class="MsoNormal" style="margin-left:.5in">In Word 2000 Basic macro would look
like this:</p>
<p class="MsoNormal" style="margin-left:.5in"> </p>
<p class="MsoNormal" style="margin-left:.5in">Sub MAIN</p>
<p class="MsoNormal" style="margin-left:.5in">Begin Dialog UserDialog 218,
118, "BibleWorks"</p>
<p class="MsoNormal" style="margin-left:.5in">TextBox 10, 26, 189,
18, .TextBox1</p>
<p class="MsoNormal" style="margin-left:.5in">Text 8, 6, 176, 13,
"Enter Reference to Insert:"</p>
<p class="MsoNormal" style="margin-left:.5in">OKButton 115, 56, 88,
21</p>
<p class="MsoNormal" style="margin-left:.5in">CancelButton 114, 81,
88, 21</p>
<p class="MsoNormal" style="margin-left:.5in">End Dialog</p>
<p class="MsoNormal" style="margin-left:.5in">Dim VerseDlg As UserDialog</p>
<p class="MsoNormal" style="margin-left:.5in">DisableInput</p>
<p class="MsoNormal" style="margin-left:.5in">ChanNum =
DDEInitiate("bw900", "Commands")</p>
<p class="MsoNormal" style="margin-left:.5in">Dialog VerseDlg</p>
<p class="MsoNormal" style="margin-left:.5in">Verse$ = VerseDlg.TextBox1</p>
<p class="MsoNormal" style="margin-left:.5in">DDEExecute ChanNum, Verse$</p>
<p class="MsoNormal" style="margin-left:.5in">EditPaste</p>
<p class="MsoNormal" style="margin-left:.5in">DDETerminate ChanNum</p>
<p class="MsoNormal" style="margin-left:.5in">End Sub</p>
<p class="MsoNormal"> </p>
<hr noshade="" color="#CDE6FF">
<p class="MsoNormal"><a name="OLEAutomationEx"><b>An OLE Automation Example</b></a></p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">The following is an OLE Automation example also in Word. </p>
<p class="MsoNormal"> </p>
<p class="MsoNormal" style="margin-left:.5in;page-break-after:avoid">Sub Main()</p>
<p class="MsoNormal" style="margin-left:.5in;page-break-after:avoid">
Dim bwObj As Object</p>
<p class="MsoNormal" style="margin-left:.5in;page-break-after:avoid">
Set bwObj = CreateObject("bibleworks.automation") </p>
<p class="MsoNormal" style="margin-left:.5in;page-break-after:avoid">
bwObj.AutoQuit (0)</p>
<p class="MsoNormal" style="margin-left:.5in;page-break-after:avoid">
bwObj.GoToVerse ("Mat 1:5")</p>
<p class="MsoNormal" style="margin-left:.5in;page-break-after:avoid">
MsgBox "You should be at Matthew 1:5"</p>
<p class="MsoNormal" style="margin-left:.5in;page-break-after:avoid">
a$ = bwObj.GetCurrentVerse()</p>
<p class="MsoNormal" style="margin-left:.5in;page-break-after:avoid">
MsgBox "The current verse is " + a$</p>
<p class="MsoNormal" style="margin-left:.5in;page-break-after:avoid">
bwObj.SetVersions ("KJV KJV ASV BGT")</p>
<p class="MsoNormal" style="margin-left:.5in;page-break-after:avoid">
MsgBox "The current search version should be KJV."</p>
<p class="MsoNormal" style="margin-left:.5in;page-break-after:avoid">
a$ = bwObj.GetVersions()</p>
<p class="MsoNormal" style="margin-left:.5in;page-break-after:avoid">
MsgBox a$</p>
<p class="MsoNormal" style="margin-left:.5in;page-break-after:avoid">
bwObj.Lookup ("moses")</p>
<p class="MsoNormal" style="margin-left:.5in;page-break-after:avoid">
MsgBox "I just looked up Moses"</p>
<p class="MsoNormal" style="margin-left:.5in;page-break-after:avoid">
Set bwObj = Nothing</p>
<p class="MsoNormal" style="margin-left:.5in;page-break-after:avoid">End Sub </p>
</div>
</div>
<p class="MsoNormal" style="page-break-after: avoid; margin-left: .5in"> </p>
<hr noshade="" color="#CDE6FF">
<p class="MsoNormal" style="page-break-after: avoid; margin-left: .5in"> </p>
<h3 style="page-break-after: avoid; margin-left: 0.2in">
<a name="Word2003UnicodeMacros">Word 2003 Unicode Macros</a></h3>
<p class="MsoNormal" style="page-break-after: avoid; margin-left: .5in"> </p>
<p class="MsoNormal" style="page-break-after: avoid; margin-left: .5in">
BibleWorks contains support internally for converting BibleWorks non-Unicode
fonts to Unicode. If you have Word Documents which use BibleWorks non-Unicode
fonts you can access the conversion routines through the following Word Macros.
They have been tested only in Word 2003. To implement them just copy the blue
text below into the Word Macro editor. If you want to use a different Unicode
font you will need to edit the font names in the calling routines.</p>
<p class="MsoNormal" style="page-break-after: avoid; margin-left: .5in"> </p>
<p class="MsoNormal" style="page-break-after: avoid; margin-left: .5in">
<font color="#0000FF">Sub ConvertAllBwGrk2Unicode()<br>
ConvertBwGrk2Unicode "bwgrkl", "Arial Unicode MS", True<br>
End Sub</font></p>
<p class="MsoNormal" style="page-break-after: avoid; margin-left: .5in">
<font color="#0000FF"><br>
Sub ConvertAllBwHeb2Unicode()<br>
ConvertBwHeb2Unicode "bwhebb", "Ezra SIL", True<br>
End Sub</font></p>
<p class="MsoNormal" style="page-break-after: avoid; margin-left: .5in">
<font color="#0000FF"><br>
Sub ConvertAllBwLex2Unicode()<br>
ConvertBwLex2Unicode "bwlexs", "Arial Unicode MS", True<br>
End Sub</font></p>
<p class="MsoNormal" style="page-break-after: avoid; margin-left: .5in">
<font color="#0000FF"><br>
Sub ConvertAllBwSym2Unicode()<br>
ConvertBwSym2Unicode "bwsymbs", "Arial Unicode MS", True<br>
End Sub</font></p>
<p class="MsoNormal" style="page-break-after: avoid; margin-left: .5in">
<font color="#0000FF"><br>
Sub ConvertNextBwGrk2Unicode()<br>
ConvertBwGrk2Unicode "bwgrkl", "Arial Unicode MS", False<br>
End Sub</font></p>
<p class="MsoNormal" style="page-break-after: avoid; margin-left: .5in">
<font color="#0000FF"><br>
Sub ConvertNextBwHeb2Unicode()<br>
ConvertBwHeb2Unicode "bwhebb", "Ezra SIL", False<br>
End Sub</font></p>
<p class="MsoNormal" style="page-break-after: avoid; margin-left: .5in">
<font color="#0000FF"><br>
Sub ConvertNextBwLex2Unicode()<br>
ConvertBwLex2Unicode "bwlexs", "Arial Unicode MS", False<br>
End Sub</font></p>
<p class="MsoNormal" style="page-break-after: avoid; margin-left: .5in">
<font color="#0000FF"><br>
Sub ConvertNextBwSym2Unicode()<br>
ConvertBwSym2Unicode "bwsymbs", "Arial Unicode MS", False<br>
End Sub</font><font color="#FF0000"><br>
</font></p>
<p class="MsoNormal" style="page-break-after: avoid; margin-left: .5in">The
following are support routines for the previous subroutines.</p>
<p class="MsoNormal" style="page-break-after: avoid; margin-left: .5in"> </p>
<hr noshade="" color="#CDE6FF">
<font size="2">
<blockquote>
<p><font color="#0000FF">Sub ConvertBwHeb2Unicode(fromfont$, tofont$,
doentirefile)</font></p>
<p><font color="#0000FF">Dim o As Object</font></p>
<p><font color="#0000FF">Dim ucstr As Variant</font></p>
<p><font color="#0000FF">ReDim ucstr(1024) As Long</font></p>
<p><font color="#0000FF">If (doentirefile = True) Then Selection.HomeKey
Unit:=wdStory</font></p>
<p><font color="#0000FF">Set o = CreateObject("bibleworks.automation")</font></p>
<p><font color="#0000FF">Application.ScreenUpdating = True</font></p>
<p><font color="#0000FF">icheck = 0</font></p>
<p><font color="#0000FF">While (icheck = 0)</font></p>
<p><font color="#0000FF">Selection.Find.ClearFormatting</font></p>
<p><font color="#0000FF">With Selection.Find</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.Font.Name = fromfont$</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.Text = ""</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.Replacement.Text = ""</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.Forward = True</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.Wrap = wdFindStop</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.Format = True</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.MatchCase = False</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.MatchWholeWord = False</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.MatchKashida = False</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.MatchDiacritics = False</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.MatchAlefHamza = False</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.MatchControl = False</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.MatchByte = False</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.CorrectHangulEndings =
False</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.MatchAllWordForms =
False</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.MatchSoundsLike = False</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.MatchWildcards = False</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.MatchFuzzy = False</font></p>
<p><font color="#0000FF">End With</font></p>
<p><font color="#0000FF">If (Selection.Find.Execute = False) Then</font></p>
<p><font color="#0000FF">icheck = 1</font></p>
<p><font color="#0000FF">Else</font></p>
<p><font color="#0000FF">istart = 1</font></p>
<p><font color="#0000FF">iend = Selection.Characters.Count</font></p>
<p><font color="#0000FF">ReDim ucstr(3 * iend + 2) As Long</font></p>
<p><font color="#0000FF">ucstr(1) = iend</font></p>
<p><font color="#0000FF">For i = istart To iend</font></p>
<p><font color="#0000FF">ucstr(i + 1) = Asc(Selection.Characters(i))</font></p>
<p><font color="#0000FF">Next i</font></p>
<p><font color="#0000FF">o.BwHebb2Unicode ucstr</font></p>
<p><font color="#0000FF">rem Selection.Delete</font></p>
<p><font color="#0000FF">Application.Keyboard (1037)</font></p>
<p><font color="#0000FF">With Selection.Font</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.NameFarEast = "SimSun"</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.NameAscii = "Arial"</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.NameOther = "Arial"</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.Name = "Arial"</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.Size = 10</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.Bold = False</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.Italic = False</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.Underline =
wdUnderlineNone</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.UnderlineColor =
wdColorAutomatic</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.StrikeThrough = False</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.DoubleStrikeThrough =
False</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.Outline = False</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.Emboss = False</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.Shadow = False</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.Hidden = False</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.SmallCaps = False</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.AllCaps = False</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.Color =
wdColorAutomatic</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.Engrave = False</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.Superscript = False</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.Subscript = False</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.Spacing = 0</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.Scaling = 100</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.Position = 0</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.Kerning = 0</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.Animation =
wdAnimationNone</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">
.DisableCharacterSpaceGrid = False</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.EmphasisMark =
wdEmphasisMarkNone</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.SizeBi = 14</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.NameBi = tofont$</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.BoldBi = False</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.ItalicBi = False</font></p>
<p><font color="#0000FF">End With</font></p>
<p><font color="#0000FF">For i = 1 To ucstr(1)</font></p>
<p><font color="#0000FF">s$ = ChrW(ucstr(i + 1))</font></p>
<p><font color="#0000FF">Selection.TypeText Text:=s$</font></p>
<p><font color="#0000FF">Next i</font></p>
<p><font color="#0000FF">Application.Keyboard (1033)</font></p>
<p><font color="#0000FF">End If</font></p>
<p><font color="#0000FF">If (doentirefile = False) Then icheck = 1</font></p>
<p><font color="#0000FF">Wend</font></p>
<p><font color="#0000FF">Application.ScreenUpdating = True</font></p>
<p><font color="#0000FF">Set bwutil = Nothing</font></p>
<p><font color="#0000FF">End Sub</font></p>
<hr noshade="" color="#CDE6FF">
<p> </p>
<p><font color="#0000FF">Sub ConvertBwGrk2Unicode(fromfont$, tofont$,
doentirefile)</font></p>
<p><font color="#0000FF">Dim o As Object</font></p>
<p><font color="#0000FF">Dim ucstr As Variant</font></p>
<p><font color="#0000FF">ReDim ucstr(1024) As Long</font></p>
<p><font color="#0000FF">If (doentirefile = True) Then Selection.HomeKey
Unit:=wdStory</font></p>
<p><font color="#0000FF">Set o = CreateObject("bibleworks.automation")</font></p>
<p><font color="#0000FF">icheck = 0</font></p>
<p><font color="#0000FF">While (icheck = 0)</font></p>
<p><font color="#0000FF">Selection.Find.ClearFormatting</font></p>
<p><font color="#0000FF">With Selection.Find</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.Font.Name = fromfont$</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.Text = ""</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.Replacement.Text = ""</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.Forward = True</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.Wrap = wdFindStop</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.Format = True</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.MatchCase = False</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.MatchWholeWord = False</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.MatchKashida = False</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.MatchDiacritics = False</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.MatchAlefHamza = False</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.MatchControl = False</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.MatchByte = False</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.CorrectHangulEndings =
False</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.MatchAllWordForms =
False</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.MatchSoundsLike = False</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.MatchWildcards = False</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.MatchFuzzy = False</font></p>
<p><font color="#0000FF">End With</font></p>
<p><font color="#0000FF">If (Selection.Find.Execute = False) Then</font></p>
<p><font color="#0000FF">icheck = 1</font></p>
<p><font color="#0000FF">Else</font></p>
<p><font color="#0000FF">istart = 1</font></p>
<p><font color="#0000FF">iend = Selection.Characters.Count</font></p>
<p><font color="#0000FF">ReDim ucstr(3 * iend + 2) As Long</font></p>
<p><font color="#0000FF">ucstr(1) = iend</font></p>
<p><font color="#0000FF">For i = istart To iend</font></p>
<p><font color="#0000FF">ucstr(i + 1) = Asc(Selection.Characters(i))</font></p>
<p><font color="#0000FF">Next i</font></p>
<p><font color="#0000FF">o.BwGrkl2Unicode ucstr</font></p>
<p><font color="#0000FF">rem Selection.Delete</font></p>
<p><font color="#0000FF">Application.Keyboard (1032)</font></p>
<p><font color="#0000FF">With Selection.Font</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.NameFarEast = "SimSun"</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.NameAscii = "Arial"</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.NameOther = "Arial"</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.Name = "Arial"</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.Size = 10</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.Bold = False</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.Italic = False</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.Underline =
wdUnderlineNone</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.UnderlineColor =
wdColorAutomatic</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.StrikeThrough = False</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.DoubleStrikeThrough =
False</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.Outline = False</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.Emboss = False</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.Shadow = False</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.Hidden = False</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.SmallCaps = False</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.AllCaps = False</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.Color =
wdColorAutomatic</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.Engrave = False</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.Superscript = False</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.Subscript = False</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.Spacing = 0</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.Scaling = 100</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.Position = 0</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.Kerning = 0</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.Animation =
wdAnimationNone</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">
.DisableCharacterSpaceGrid = False</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.EmphasisMark =
wdEmphasisMarkNone</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.SizeBi = 14</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.NameBi = tofont$</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.BoldBi = False</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.ItalicBi = False</font></p>
<p><font color="#0000FF">End With</font></p>
<p><font color="#0000FF">For i = 1 To ucstr(1)</font></p>
<p><font color="#0000FF">s$ = ChrW(ucstr(i + 1))</font></p>
<p><font color="#0000FF">Selection.TypeText Text:=s$</font></p>
<p><font color="#0000FF">Next i</font></p>
<p><font color="#0000FF">Application.Keyboard (1033)</font></p>
<p><font color="#0000FF">End If</font></p>
<p><font color="#0000FF">If (doentirefile = False) Then icheck = 1</font></p>
<p><font color="#0000FF">Wend</font></p>
<p><font color="#0000FF">Set bwutil = Nothing</font></p>
<p><font color="#0000FF">End Sub</font></p>
<hr noshade="" color="#CDE6FF">
<p> </p>
<p><font color="#0000FF">Sub ConvertBwSym2Unicode(fromfont$, tofont$,
doentirefile)</font></p>
<p><font color="#0000FF">Dim o As Object</font></p>
<p><font color="#0000FF">Dim ucstr As Variant</font></p>
<p><font color="#0000FF">ReDim ucstr(1024) As Long</font></p>
<p><font color="#0000FF">If (doentirefile = True) Then Selection.HomeKey
Unit:=wdStory</font></p>
<p><font color="#0000FF">Set o = CreateObject("bibleworks.automation")</font></p>
<p><font color="#0000FF">icheck = 0</font></p>
<p><font color="#0000FF">While (icheck = 0)</font></p>
<p><font color="#0000FF">Selection.Find.ClearFormatting</font></p>
<p><font color="#0000FF">With Selection.Find</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.Font.Name = fromfont$</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.Text = ""</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.Replacement.Text = ""</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.Forward = True</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.Wrap = wdFindStop</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.Format = True</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.MatchCase = False</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.MatchWholeWord = False</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.MatchKashida = False</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.MatchDiacritics = False</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.MatchAlefHamza = False</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.MatchControl = False</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.MatchByte = False</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.CorrectHangulEndings =
False</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.MatchAllWordForms =
False</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.MatchSoundsLike = False</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.MatchWildcards = False</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.MatchFuzzy = False</font></p>
<p><font color="#0000FF">End With</font></p>
<p><font color="#0000FF">If (Selection.Find.Execute = False) Then</font></p>
<p><font color="#0000FF">icheck = 1</font></p>
<p><font color="#0000FF">Else</font></p>
<p><font color="#0000FF">istart = 1</font></p>
<p><font color="#0000FF">iend = Selection.Characters.Count</font></p>
<p><font color="#0000FF">ReDim ucstr(3 * iend + 2) As Long</font></p>
<p><font color="#0000FF">ucstr(1) = iend</font></p>
<p><font color="#0000FF">For i = istart To iend</font></p>
<p><font color="#0000FF">ucstr(i + 1) = Asc(Selection.Characters(i))</font></p>
<p><font color="#0000FF">Next i</font></p>
<p><font color="#0000FF">o.BwSym2Unicode ucstr</font></p>
<p><font color="#0000FF">rem Selection.Delete</font></p>
<p><font color="#0000FF">Application.Keyboard (1033)</font></p>
<p><font color="#0000FF">With Selection.Font</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.NameFarEast = "SimSun"</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.NameAscii = tofont$</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.NameOther = tofont$</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.Name = tofont$</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.Size = 10</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.Bold = False</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.Italic = False</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.Underline =
wdUnderlineNone</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.UnderlineColor =
wdColorAutomatic</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.StrikeThrough = False</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.DoubleStrikeThrough =
False</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.Outline = False</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.Emboss = False</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.Shadow = False</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.Hidden = False</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.SmallCaps = False</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.AllCaps = False</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.Color =
wdColorAutomatic</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.Engrave = False</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.Superscript = False</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.Subscript = False</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.Spacing = 0</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.Scaling = 100</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.Position = 0</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.Kerning = 0</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.Animation =
wdAnimationNone</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">
.DisableCharacterSpaceGrid = False</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.EmphasisMark =
wdEmphasisMarkNone</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.SizeBi = 12</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.NameBi = tofont$</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.BoldBi = False</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.ItalicBi = False</font></p>
<p><font color="#0000FF">End With</font></p>
<p><font color="#0000FF">For i = 1 To ucstr(1)</font></p>
<p><font color="#0000FF">isetsuper = 0</font></p>
<p><font color="#0000FF">If (ucstr(i + 1) < 0) Then</font></p>
<p><font color="#0000FF">Selection.Font.Superscript = True</font></p>
<p><font color="#0000FF">isetsuper = 1</font></p>
<p><font color="#0000FF">s$ = ChrW(-ucstr(i + 1))</font></p>
<p><font color="#0000FF">ElseIf (ucstr(i + 1) > 0) Then</font></p>
<p><font color="#0000FF">s$ = ChrW(ucstr(i + 1))</font></p>
<p><font color="#0000FF">Else</font></p>
<p><font color="#0000FF">s$ = " "</font></p>
<p><font color="#0000FF">End If</font></p>
<p><font color="#0000FF">Selection.TypeText Text:=s$</font></p>
<p><font color="#0000FF">If (isetsuper = 1) Then Selection.Font.Superscript
= False</font></p>
<p><font color="#0000FF">Next i</font></p>
<p><font color="#0000FF">Application.Keyboard (1033)</font></p>
<p><font color="#0000FF">End If</font></p>
<p><font color="#0000FF">If (doentirefile = False) Then icheck = 1</font></p>
<p><font color="#0000FF">Wend</font></p>
<p><font color="#0000FF">Application.ScreenUpdating = True</font></p>
<p><font color="#0000FF">Set bwutil = Nothing</font></p>
<p><font color="#0000FF">End Sub</font></p>
<hr noshade="" color="#CDE6FF">
<p> </p>
<p><font color="#0000FF">Sub ConvertBwLex2Unicode(fromfont$, tofont$,
doentirefile)</font></p>
<p><font color="#0000FF">Dim o As Object</font></p>
<p><font color="#0000FF">Dim ucstr As Variant</font></p>
<p><font color="#0000FF">ReDim ucstr(1024) As Long</font></p>
<p><font color="#0000FF">If (doentirefile = True) Then Selection.HomeKey
Unit:=wdStory</font></p>
<p><font color="#0000FF">Set o = CreateObject("bibleworks.automation")</font></p>
<p><font color="#0000FF">icheck = 0</font></p>
<p><font color="#0000FF">While (icheck = 0)</font></p>
<p><font color="#0000FF">Selection.Find.ClearFormatting</font></p>
<p><font color="#0000FF">With Selection.Find</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.Font.Name = fromfont$</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.Text = ""</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.Replacement.Text = ""</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.Forward = True</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.Wrap = wdFindStop</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.Format = True</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.MatchCase = False</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.MatchWholeWord = False</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.MatchKashida = False</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.MatchDiacritics = False</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.MatchAlefHamza = False</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.MatchControl = False</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.MatchByte = False</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.CorrectHangulEndings =
False</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.MatchAllWordForms =
False</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.MatchSoundsLike = False</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.MatchWildcards = False</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.MatchFuzzy = False</font></p>
<p><font color="#0000FF">End With</font></p>
<p><font color="#0000FF">If (Selection.Find.Execute = False) Then</font></p>
<p><font color="#0000FF">icheck = 1</font></p>
<p><font color="#0000FF">Else</font></p>
<p><font color="#0000FF">istart = 1</font></p>
<p><font color="#0000FF">iend = Selection.Characters.Count</font></p>
<p><font color="#0000FF">ReDim ucstr(3 * iend + 2) As Long</font></p>
<p><font color="#0000FF">ucstr(1) = iend</font></p>
<p><font color="#0000FF">For i = istart To iend</font></p>
<p><font color="#0000FF">ucstr(i + 1) = Asc(Selection.Characters(i))</font></p>
<p><font color="#0000FF">Next i</font></p>
<p><font color="#0000FF">o.BwLex2Unicode ucstr</font></p>
<p><font color="#0000FF">rem Selection.Delete</font></p>
<p><font color="#0000FF">Application.Keyboard (1033)</font></p>
<p><font color="#0000FF">With Selection.Font</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.NameFarEast = "SimSun"</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.NameAscii = tofont$</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.NameOther = tofont$</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.Name = tofont$</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.Size = 10</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.Bold = False</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.Italic = False</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.Underline =
wdUnderlineNone</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.UnderlineColor =
wdColorAutomatic</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.StrikeThrough = False</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.DoubleStrikeThrough =
False</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.Outline = False</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.Emboss = False</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.Shadow = False</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.Hidden = False</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.SmallCaps = False</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.AllCaps = False</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.Color =
wdColorAutomatic</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.Engrave = False</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.Superscript = False</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.Subscript = False</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.Spacing = 0</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.Scaling = 100</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.Position = 0</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.Kerning = 0</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.Animation =
wdAnimationNone</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">
.DisableCharacterSpaceGrid = False</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.EmphasisMark =
wdEmphasisMarkNone</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.SizeBi = 12</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.NameBi = tofont$</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.BoldBi = False</font></p>
<p style="margin-left: 0.5in"><font color="#0000FF">.ItalicBi = False</font></p>
<p><font color="#0000FF">End With</font></p>
<p><font color="#0000FF">For i = 1 To ucstr(1)</font></p>
<p><font color="#0000FF">isetsuper = 0</font></p>
<p><font color="#0000FF">If (ucstr(i + 1) < 0) Then</font></p>
<p><font color="#0000FF">Selection.Font.Superscript = True</font></p>
<p><font color="#0000FF">isetsuper = 1</font></p>
<p><font color="#0000FF">s$ = ChrW(-ucstr(i + 1))</font></p>
<p><font color="#0000FF">ElseIf (ucstr(i + 1) > 0) Then</font></p>
<p><font color="#0000FF">s$ = ChrW(ucstr(i + 1))</font></p>
<p><font color="#0000FF">Else</font></p>
<p><font color="#0000FF">s$ = " "</font></p>
<p><font color="#0000FF">End If</font></p>
<p><font color="#0000FF">Selection.TypeText Text:=s$</font></p>
<p><font color="#0000FF">If (isetsuper = 1) Then Selection.Font.Superscript
= False</font></p>
<p><font color="#0000FF">Next i</font></p>
<p><font color="#0000FF">Application.Keyboard (1033)</font></p>
<p><font color="#0000FF">End If</font></p>
<p><font color="#0000FF">If (doentirefile = False) Then icheck = 1</font></p>
<p><font color="#0000FF">Wend</font></p>
<p><font color="#0000FF">Application.ScreenUpdating = True</font></p>
<p><font color="#0000FF">Set bwutil = Nothing</font></p>
<p><font color="#0000FF">End Sub</font></p>
</blockquote>
</font>
<p class="MsoNormal" style="page-break-after: avoid; margin-left: .5in"> </p>
<p class="MsoNormal" style="page-break-after: avoid; margin-left: .5in"> </p>
</body></html>