Page 3 of 3 FirstFirst 123
Results 81 to 94 of 94

Thread: VBWTool Utility - Now with "Highlight" function

  1. #81
    Fanatic Member aconybeare's Avatar
    Join Date
    Oct 2001
    Location
    UK
    Posts
    772

    Re: VBWTool Utility - Now with "Highlight" function

    Martin,

    Are you looking to extend this tool further? I've only got 22 listed (in c:\windows\vb_world)

    What are you trying to add in?

  2. #82

    Thread Starter
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,427

    Re: VBWTool Utility - Now with "Highlight" function

    Here is what I have at the present. The Text - blah ones are common things that I write when moderating such as how to mark a thread as answered. I wanted to add a new one but it pushed the VBCode one off the bottom, so I had to combine the new one with another and call it Miscellaneous (which I now see that I misspelled).

    BTW it doesn't matter where your htm files are as long as the path is reflected in the registry contexts entries.
    Attached Images Attached Images  

  3. #83
    Fanatic Member aconybeare's Avatar
    Join Date
    Oct 2001
    Location
    UK
    Posts
    772

    Re: VBWTool Utility - Now with "Highlight" function

    I guess it's not possible to create a sub-menu on the short cut menu

    Code:
    SuperScript
    text - EditBy
            Misc
            Long Signature
            Welcome
    Underline
    etc.
    Don't think I've ever seen it done, but might be possible with ie6+ or 5.5+ and context menus

  4. #84

  5. #85
    Fanatic Member aconybeare's Avatar
    Join Date
    Oct 2001
    Location
    UK
    Posts
    772

    Re: VBWTool Utility - Now with "Highlight" function

    It must be, go to this page and right click!

    Oh pretty much any page should have the encoding sub menu?

  6. #86

  7. #87
    PowerPoster Simply Me's Avatar
    Join Date
    Aug 2003
    Posts
    2,732

    Re: VBWTool Utility - Now with "Highlight" function

    Marty or anyone, please put all together those tools in one download. thanks!
    To give is always to be NOBLE...
    To received is always to be BLESSED....
    Each day strive to be NOBLE
    Each day strive to be BLESSED

    If this post has helped you. Please take time to rate it.

    >=|+|=< Simply Me >=|+|=<

    ----------------------------------------
    Connection Strings | Number Only in Textbox | Splash Screen with Progress Bar | Printing to 1/2 of perforated bond paper |
    Freeze 2005 DataGridView Column

  8. #88

    Thread Starter
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,427

    Re: VBWTool Utility - Now with "Highlight" function

    Quote Originally Posted by Simply Me
    Marty or anyone, please put all together those tools in one download. thanks!
    Quote Originally Posted by stewie
    could someone make an install file for the one with the vbcode tag inside it because i have no idea what to do with those files in the post above my last one
    Done. See post #1.

  9. #89

  10. #90
    PowerPoster Simply Me's Avatar
    Join Date
    Aug 2003
    Posts
    2,732

    Re: VBWTool Utility - Updated Installation Process

    Quote Originally Posted by MartinLiss
    Updated 05/09/2006. Please see post #1.
    Thanks Marty!
    To give is always to be NOBLE...
    To received is always to be BLESSED....
    Each day strive to be NOBLE
    Each day strive to be BLESSED

    If this post has helped you. Please take time to rate it.

    >=|+|=< Simply Me >=|+|=<

    ----------------------------------------
    Connection Strings | Number Only in Textbox | Splash Screen with Progress Bar | Printing to 1/2 of perforated bond paper |
    Freeze 2005 DataGridView Column

  11. #91
    Fanatic Member aconybeare's Avatar
    Join Date
    Oct 2001
    Location
    UK
    Posts
    772

    Re: VBWTool Utility - Now with "Highlight" function

    Hi,

    I've attempted to integrate RobDog888's Advanced VB/Office Guru™ SpellChecker™ into Martin's spellCheck script. It's not perfect, so if anyone would like to test it please go ahead; any suggestions or fixes will be welcomed

    I've tested it with W2K and Office 10 (2002)

    To test open C:\WINNT\Vb-World
    Make a copy of SpellCheck.htm rename it to SpellCheck.old
    Then paste the code below into SpellCheck.htm and save, create a test page with a textarea on it enter some text select it, right click it and choose SpellCheck.
    VB Code:
    1. <!--
    2. +---------------------------------------------------------------------------+
    3.     VB-WORLD Forums - Tagging Scripts 1.0
    4.     Martin Liss
    5.     Integrated with RobDog's Advanced VB/Office Guru SpellChecker
    6.     [url]http://www.vbforums.com/showthread.php?t=350402[/url]
    7.     Function:    Spell Checker v2.0
    8.     Description: This script uses Microsoft Word to check the spelling in
    9.                  posts. Word is assumed to be present.
    10.  
    11. +---------------------------------------------------------------------------+
    12. -->
    13.  
    14. <script type="text/vbscript">
    15. Const wdWindowStateNormal=0
    16. Const wdWindowStateMaximize=1
    17. Const wdWindowStateMinimize=2
    18. Const wdDialogToolsSpellingAndGrammar=828
    19.  
    20. Dim objWindow
    21. Dim objSource
    22. Dim objSelect
    23. Dim objSelectRange
    24.  
    25. Set objWindow = window.external.menuArguments
    26. Set objSource = objWindow.event.srcElement
    27. Set oDocument = objWindow.document
    28. Set objSelect = oDocument.selection
    29. Set objSelectRange = objSelect.createRange()
    30.  
    31. If objSource.tagName = "TEXTAREA" And Len(objSelectRange.text)>0 Then
    32.     Dim sc: Set sc = New SpellChecker
    33.     objSelectRange.text=sc.CheckThis(objSelectRange.text)
    34.     Set sc=Nothing
    35. End If
    36.  
    37.  
    38. Class SpellChecker
    39.     Dim moApp, mbKillMe
    40.  
    41.     Public Property Get KillMe()
    42.         KillMe = mbKillMe
    43.     End Property
    44.  
    45.     Public Property Let KillMe(Value)
    46.         mbKillMe = Value
    47.     End Property
    48.  
    49.     Private Sub Class_Initialize()
    50.         On Error Resume Next
    51.         '<INITIALIZE WORD>
    52.         Set moApp = GetObject(, "Word.Application")
    53.         'window.alert(TypeName(moApp))
    54.         If TypeName(moApp) = "Empty" Or TypeName(moApp) = "Nothing" Then
    55.             ' Word is not currently running.
    56.             ' launch it and set flag to close it when done
    57.             Set moApp = CreateObject("Word.Application")
    58.             mbKillMe = True
    59.         End If
    60.     End Sub
    61.  
    62.     Private Sub Class_Terminate()
    63.         If KillMe = True Then
    64.             moApp.Quit False
    65.         End If
    66.         Set moApp=Nothing
    67.     End Sub
    68.  
    69.     Public Function CheckThis(ByVal msSpell)
    70.         On Error GoTo 0 'Resume Next
    71.  
    72.         Dim oDoc 'As Word.Document
    73.         Dim iWSE 'As Integer
    74.         Dim iWGE 'As Integer
    75.         Dim sReplace 'As String
    76.         Dim lResp 'As Long
    77.  
    78.         If msSpell = "" Then Exit Function
    79.         'window.alert(TypeName(moApp) & vbNewLine & moApp.Version)
    80.         Select Case moApp.Version
    81.             Case "9.0", "10.0", "11.0"
    82.                 Set oDoc = moApp.Documents.Add(, , 1, True)
    83.             Case "8.0"
    84.                 Set oDoc = moApp.Documents.Add
    85.             Case Else
    86.                 window.alert("Unsupported version of word.")' & moApp.Version)
    87.                 Exit Function
    88.         End Select
    89.  
    90.         oDoc.Words.First.InsertBefore msSpell
    91.         iWSE = oDoc.SpellingErrors.Count
    92.         iWGE = oDoc.GrammaticalErrors.Count
    93.         '<CHECK SPELLING AND GRAMMER DIALOG BOX>
    94.         If iWSE > 0 Or iWGE > 0 Then
    95.             '<HIDE MAIN WORD WINDOW>
    96.             moApp.Visible = False
    97.             If (moApp.WindowState = wdWindowStateNormal) Or (moApp.WindowState = wdWindowStateMaximize) Then
    98.                 moApp.WindowState = wdWindowStateMinimize
    99.             Else
    100.                 moApp.WindowState = wdWindowStateMinimize
    101.             End If
    102.             '</HIDE MAIN WORD WINDOW>
    103.             '<PREP CHECK SPELLING OPTIONS DIALOG BOX (MODIFY TO YOUR PREFERENCES)>
    104.             moApp.Dialogs(wdDialogToolsSpellingAndGrammar).Application.Options.CheckGrammarWithSpelling = True
    105.             moApp.Dialogs(wdDialogToolsSpellingAndGrammar).Application.Options.SuggestSpellingCorrections = True
    106.             moApp.Dialogs(wdDialogToolsSpellingAndGrammar).Application.Options.IgnoreUppercase = True
    107.             moApp.Dialogs(wdDialogToolsSpellingAndGrammar).Application.Options.IgnoreInternetAndFileAddresses = True
    108.             moApp.Dialogs(wdDialogToolsSpellingAndGrammar).Application.Options.IgnoreMixedDigits = False
    109.             moApp.Dialogs(wdDialogToolsSpellingAndGrammar).Application.Options.ShowReadabilityStatistics = False
    110.             '</PREP CHECK SPELLING OPTIONS DIALOG BOX (MODIFY TO YOUR PREFERENCES)>
    111.             '<DO ACTUAL SPELL CHECKING>
    112.             moApp.Visible = True
    113.             moApp.Activate
    114.             lResp = moApp.Dialogs(wdDialogToolsSpellingAndGrammar).Display
    115.             '</DO ACTUAL SPELL CHECKING>
    116.             If lResp < 0 Then
    117.                 moApp.Visible = True
    118.                 window.alert("Applying corrections!")
    119.                 Call Window.ClipboardData.SetData("Text","") 'Clipboard.Clear
    120.  
    121.                 oDoc.Select
    122.                 oDoc.Range.Copy
    123.                 sReplace = Window.ClipboardData.GetData("Text") 'sReplace = Clipboard.GetText(1)
    124.                 '<FIX FOR POSSIBLE EXTRA LINE BREAK AT END OF TEXT>
    125.                 If (InStrRev(sReplace, Chr(13) & Chr(10))) = (Len(sReplace) - 1) Then
    126.                     sReplace = Mid(sReplace, 1, Len(sReplace) - 2)
    127.                 End If
    128.                 '</FIX FOR POSSIBLE EXTRA LINE BREAK AT END OF TEXT>
    129.                 CheckThis = sReplace
    130.             ElseIf lResp = 0 Then
    131.                 window.alert("Spelling corrections have been canceled!")
    132.                 CheckThis = msSpell
    133.             End If
    134.         Else
    135.             window.alert("No spelling errors found or no suggestions available!")
    136.             CheckThis = msSpell
    137.         End If
    138.         '</CHECK SPELLING AND GRAMMER DIALOG BOX>
    139.         oDoc.Close False
    140.         Set oDoc = Nothing
    141.         '<HIDE WORD IF THERE ARE NO OTHER INSTANCES>
    142.         If KillMe = True Then
    143.             moApp.Visible = False
    144.         End If
    145.         '</HIDE WORD IF THERE ARE NO OTHER INSTANCES>
    146.  
    147.         If Err.Number <> 0 Then
    148.             If Err.Number = "91" Then
    149.                 'Resume Next
    150.             ElseIf Err.Number = "462" Then
    151.                 window.alert("Spell checking is temporary un-available!  Try again after program re-start.")
    152.             ElseIf Err.Number = 429 Then
    153.                 Set moApp = Nothing
    154.                 'Resume Next
    155.             Else
    156.                 window.alert(Err.Number & " " & Err.Description)
    157.             End If
    158.         End If
    159.     End Function
    160. End Class
    161. </script>

  12. #92

    Thread Starter
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,427

    Re: VBWTool Utility - Now with "Highlight" function

    I don't have time to update the installation package but here is a new vbcode htm file that you can substitute for the old one. This one will format your VB code in the new fashion.
    Attached Files Attached Files

  13. #93
    PowerPoster Simply Me's Avatar
    Join Date
    Aug 2003
    Posts
    2,732

    Re: VBWTool Utility - Now with "Highlight" function

    Marty, What's the difference of the old one (date 05-09-2006) with this new one? correct me if im wrong...I compared the code of the old against the new one and it seem they are the same?
    To give is always to be NOBLE...
    To received is always to be BLESSED....
    Each day strive to be NOBLE
    Each day strive to be BLESSED

    If this post has helped you. Please take time to rate it.

    >=|+|=< Simply Me >=|+|=<

    ----------------------------------------
    Connection Strings | Number Only in Textbox | Splash Screen with Progress Bar | Printing to 1/2 of perforated bond paper |
    Freeze 2005 DataGridView Column

  14. #94

Page 3 of 3 FirstFirst 123

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width