Results 1 to 12 of 12
  1. #1
    Silver Lounger
    Join Date
    Jun 2001
    Location
    Morden, Surrey, United Kingdom
    Posts
    1,838
    Thanks
    3
    Thanked 0 Times in 0 Posts

    WordBasic equivalent (VBA O97)

    Help please! Does anyone know what the equivalent of this WordBasic line is in VBA?

    WordBasic.InsertField Field:="fillin" + chr(34) + "Insert ID No" + Chr(34)

    I know you can use fillin fields in the main document but the location doesn't exist until the code puts it in so I can't do that on this occasion. I've looked in the Help but neither 'fillin' nor 'insertfield' are mentioned and 'Field' doesn't seem to be any use, either.

    Any help would be greatly appreciated!
    Beryl M


  2. #2
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Sint Niklaas, Belgium
    Posts
    2,778
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: WordBasic equivalent (VBA O97)

    According the helpfile:
    Selection.Fields.Add Range:=Range, Type:=wdFieldFillIn

    In the help file goto
    Microsoft Word Visual Basic Reference
    Visual Basic Reference
    Getting Started with Visual Basic
    Converting from WordBasic to Visual Basic
    Visual Basic Equivalents for WordBasic Commands

    There you have a complete list of all the WordBasic commands and there equivalents.

    Those help files are not installed by default, so you may have to install them.

    Hope this help
    Francois

  3. #3
    Silver Lounger
    Join Date
    Jun 2001
    Location
    Morden, Surrey, United Kingdom
    Posts
    1,838
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Re: WordBasic equivalent (VBA O97)

    Great - thanks, Francois! I'll have a nose around.
    Beryl M


  4. #4
    Gold Lounger
    Join Date
    Dec 2000
    Location
    New Hampshire, USA
    Posts
    3,386
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: WordBasic equivalent (VBA O97)

    Actually, that list list is not complete.
    And one must know something about both WordBasic and VBA to get around the list's shortcomings.

    See my rants about WordBasic to VBA conversion at my URL below.

  5. #5
    Silver Lounger
    Join Date
    Jun 2001
    Location
    Morden, Surrey, United Kingdom
    Posts
    1,838
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Re: WordBasic equivalent (VBA O97)

    Francois - I'm confused! I went to the help file in VBA, but 'MS Word VBA Ref' just opens the ordinary help list, and I can't find any of the other headings at all!

    What am I doing wrong?! <img src=/S/confused.gif border=0 alt=confused width=15 height=20>
    Beryl M


  6. #6
    Platinum Lounger
    Join Date
    Dec 2000
    Location
    Queanbeyan, New South Wales, Australia
    Posts
    3,730
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: WordBasic equivalent (VBA O97)

    A slightly shoirter path to find the same thing

    On the help index, type "wordbasic". Then select the "Visual Basic equivalents to WordBasic Commands" option.

    Hardly intuitive- MS should have made this common knowledge, and easily accessible, years ago.
    Subway Belconnen- home of the Signboard to make you smile. Get (almost) daily updates- follow SubwayBelconnen on Twitter.

  7. #7
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Sint Niklaas, Belgium
    Posts
    2,778
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: WordBasic equivalent (VBA O97)

    I started from the help file in Word, not from VBA.

    From VBA:
    Microsoft Word Visual Basic Reference
    Shortcut to Microsoft Word Visual Basic Reference
    Getting Started ....
    Same way of in previous message.
    Francois

  8. #8
    Platinum Lounger
    Join Date
    Dec 2000
    Location
    Queanbeyan, New South Wales, Australia
    Posts
    3,730
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: WordBasic equivalent (VBA O97)

    Does <A target="_blank" HREF=http://www.microsoft.com/WordDev/Articles/word2vba.htm>this reference</A> help?
    Subway Belconnen- home of the Signboard to make you smile. Get (almost) daily updates- follow SubwayBelconnen on Twitter.

  9. #9
    Silver Lounger
    Join Date
    Jun 2001
    Location
    Morden, Surrey, United Kingdom
    Posts
    1,838
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Re: WordBasic equivalent (VBA O97)

    Geoff - yes, thanks, in general and for the rest of the project I've got the wonderful job of converting! However, it doesn't mention fillin except in the context of mailmerge.

    I think I might be looking at this from the wrong angle - I thought the wordbasic command just opened an input box and asked for the entry it would then place in the document, but I've a feeling it actually puts in an ordinary fillin field and then runs it ... is this the case?

    <img src=/S/sigh.gif border=0 alt=sigh width=15 height=15> Thanks for your help.
    Beryl M


  10. #10
    Silver Lounger
    Join Date
    Jun 2001
    Location
    Morden, Surrey, United Kingdom
    Posts
    1,838
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Re: WordBasic equivalent (VBA O97)

    Now this is where I get stuck. Are we sure we're still talking about Word97 here? Because the VBA help doesn't mention WordBasic anywhere, and the Word help has an entry but only tells me (helpfully!) that WordBasic is converted automatically into VBA.

    Not on my flamin' machine it isn't! <img src=/S/bummer.gif border=0 alt=bummer width=15 height=15> And I can't find a way to get it to do so!

    Grrrr! (as someone said in a post I was reading earlier!)
    Beryl M


  11. #11
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Sint Niklaas, Belgium
    Posts
    2,778
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: WordBasic equivalent (VBA O97)

    Beryl,

    Check in the setup of Office if the 'Help for Visual Basic' is installed on your pc. Like I said in my previous message this is not installed by default in a standard installation.
    Francois

  12. #12
    Silver Lounger
    Join Date
    Jun 2001
    Location
    Morden, Surrey, United Kingdom
    Posts
    1,838
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Re: WordBasic equivalent (VBA O97)

    Oh, it is installed - I'm always having to use it! But it doesn't mention WordBasic anywhere ... <img src=/S/bummer.gif border=0 alt=bummer width=15 height=15>
    Beryl M


Posting Permissions

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