Results 1 to 7 of 7
  1. #1
    2 Star Lounger
    Join Date
    May 2002
    Location
    Atlanta, Georgia, USA
    Posts
    124
    Thanks
    0
    Thanked 0 Times in 0 Posts

    WordBasic reference - Values of the old SelInfo command

    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
    Writing Consultant / Word Template Designer
    Words Connect

  2. #2
    Super Moderator
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    3,852
    Thanks
    4
    Thanked 259 Times in 239 Posts
    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.
    Andrew Lockton, Chrysalis Design, Melbourne Australia

  3. #3
    3 Star Lounger
    Join Date
    Feb 2001
    Location
    Willow Grove, Pennsylvania, USA
    Posts
    205
    Thanks
    4
    Thanked 49 Times in 40 Posts
    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/downl...ils.aspx?id=91.
    Last edited by jjfreedman; 2013-07-27 at 19:48. Reason: Add information

  4. #4
    Super Moderator
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    3,852
    Thanks
    4
    Thanked 259 Times in 239 Posts
    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?
    Andrew Lockton, Chrysalis Design, Melbourne Australia

  5. #5
    5 Star Lounger kmurdock's Avatar
    Join Date
    Feb 2003
    Location
    Pacific Grove, California, USA
    Posts
    716
    Thanks
    10
    Thanked 34 Times in 28 Posts
    Quote Originally Posted by Andrew Lockton View Post
    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.

  6. #6
    3 Star Lounger
    Join Date
    Feb 2001
    Location
    Willow Grove, Pennsylvania, USA
    Posts
    205
    Thanks
    4
    Thanked 49 Times in 40 Posts
    Quote Originally Posted by Andrew Lockton View Post
    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

  7. #7
    3 Star Lounger
    Join Date
    Feb 2001
    Location
    Willow Grove, Pennsylvania, USA
    Posts
    205
    Thanks
    4
    Thanked 49 Times in 40 Posts
    Quote Originally Posted by kmurdock View Post
    Amen to that.
    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.

Posting Permissions

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