Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

Wordbasic Programming

  • 23-06-2013 11:57PM
    #1
    Registered Users, Registered Users 2 Posts: 86 ✭✭


    Hi guys and gals,

    I was hoping someone on here might have some knowledge of Microsoft WordBasic programming? To be honest I am not a strong programmer, it's not my main thing, but I need to edit some wordbasic code and I basically need to force some code to a new line but I cannot find any commands to help me. I am not sure if it is even possible. I am trying to load an addess into a table but I need each address line on a new row of the table.

    I have exhausted the web and cannot find anything of use to me. I have tried using Chr(13) and it does move it long some but not the forced new line that I need.

    Any help at all appreciated, even a point in the right direction.
    Thanks


Comments

  • Registered Users, Registered Users 2 Posts: 419 ✭✭Mort5000


    Have you tried recording a macro, following the steps you'd like to replicate, and see what vba is produced?


  • Registered Users, Registered Users 2 Posts: 86 ✭✭NerfNerder


    Mort5000 wrote: »
    Have you tried recording a macro, following the steps you'd like to replicate, and see what vba is produced?

    Hi,
    Thanks for your response. I've tried recording the macro but the problem is that it doesn't get recorded in wordbasic, it is in vba as I'm using a 2010 version of office. Also the address is getting populated from another area of the code, it's being pulled in dynamically, I think if I record it then it just shows the hard coding. Sorry if I'm wrong in this, as I say programming is not my forte.


  • Registered Users, Registered Users 2 Posts: 3 change direction


    I'm not sure if i understand exactly what you are trying to do but perhaps you need to append a 'vbCrLf' (carriage return + line feed) rather than a char(13) to the string. This should move the output onto a new line


  • Closed Accounts Posts: 3,357 ✭✭✭Beano


    Perhaps post up an appropriate snippet of the current code and a better explanation of what you want it to do? I havent looked at wordbasic in nearly 10 years but it might trigger something in the brain of an old fogey like myself.


  • Registered Users, Registered Users 2 Posts: 86 ✭✭NerfNerder


    Beano wrote: »
    Perhaps post up an appropriate snippet of the current code and a better explanation of what you want it to do? I havent looked at wordbasic in nearly 10 years but it might trigger something in the brain of an old fogey like myself.

    Thanks for offering your help. I managed to get it sorted out :)


  • Advertisement
Advertisement