• WordBasic reference – Values of the old SelInfo command

    Home » Forums » AskWoody support » Productivity software by function » MS Word and word processing help » WordBasic reference – Values of the old SelInfo command

    Author
    Topic
    #490255

    I am working on a template that includes old converted WordBasic commands, and I need to update them to work with Word 2010 and beyond.

    Do any old timers have a resource that would help me look up values for the SelInfo command? Those old commands used to work in previous versions of Word, but don’t in 2010

    For example, this command is failing in 2010:
    If WordBasic.SelInfo(18) Then

    I cannot find any web sites that list old WordBasic commands.

    Thanks for any help!

    Bob

    Viewing 2 reply threads
    Author
    Replies
    • #1403406

      Apparently you can find a copy of the Word 95 help installer here
      http://jay-freedman.info/default.htm

      I didn’t download it to test it out to see what was in it so I can’t tell you whether it will work or not but it might be a start for you.

      Can you show us the nearby code. We can probably work out what that particular line was testing for.

    • #1403412

      I have the WordBasic help (the same one you can download from my page) up and running. It says:

      Types 13 through 18 apply only if the selection is within a table; if the selection is not within a table, the function returns -1.

      Type Explanation
      13 The row number containing the beginning of the selection.
      14 The row number containing the end of the selection.
      15 The number of rows in the table.
      16 The table column number containing the beginning of the selection.
      17 The table column number containing the end of the selection.
      18 The greatest number of columns within any row in the selection.

      If you have any trouble getting the help installed, post back. You’ll probably need to install the help executable, which you can get from http://www.microsoft.com/en-us/download/details.aspx?id=91.

    • #1403414

      Thanks Jay. Its nice to see that the old help files used to have useful information in them. I haven’t found the help files on the more recent versions anywhere near as useful.

      Bob, your code sample doesn’t make much sense in the context of the information that Jay provided. WordBasic.SelInfo(18) would return an integer (number of columns) not a boolean (True/False). Are you sure that example line ever worked?

      • #1403500

        Thanks Jay. Its nice to see that the old help files used to have useful information in them. I haven’t found the help files on the more recent versions anywhere near as useful.

        Amen to that.:excl:

        • #1403684

          Amen to that.:excl:

          The part that’s discouraging is that the WordBasic help files missed so many meanings, bugs, and special cases that Woody Leonhard had to write the Hacker’s Guide to Word for Windows. That book was absolutely indispensable, even long after VBA replaced WordBasic. I sold my copy some years ago, and I’m thinking of replacing it — Amazon still lists some used copies. Unfortunately, there’s nothing of comparable breadth for VBA.

      • #1403682

        Bob, your code sample doesn’t make much sense in the context of the information that Jay provided. WordBasic.SelInfo(18) would return an integer (number of columns) not a boolean (True/False). Are you sure that example line ever worked?

        Under the hood, VBA’s booleans are interchangeable with integers. False = 0 and True = -1, although in an If statement any nonzero value will be treated as True.

        That means the If statement as written would return True if the Selection contains any columns, or False if it contains no columns. It looks to me like it would be equivalent to the VBA statement

        If Selection.Information(wdWithinTable) Then

    Viewing 2 reply threads
    Reply To: WordBasic reference – Values of the old SelInfo command

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: