Consulting

Results 1 to 3 of 3

Thread: Solved: Creating formula's and inserting them into word tables

  1. #1
    Knowledge Base Approver
    Space Cadet
    VBAX Tutor sandam's Avatar
    Joined
    Jan 2005
    Location
    London
    Posts
    292
    Location

    Solved: Creating formula's and inserting them into word tables

    I'd like to know if its possible to use formula's like you do in excel but with word tables and if said formulas can be created/executed using macros. It needs to be word tables however (I cant insert the excel sheet into the doc - not allowed to)

    I ask this because I'm currently working on converting our old billing template from WordPerfect 9 into Word 2003 and the main problem is that after the old macro had run its calcs, you couldn't recalculate the bill values automatically if you changed them. If I can do it using formulas that will auto update then its all gravy. if not I'm stuck writing some hectic array code and fiddling with table end of cell chars again (I've been fiddling with this one around other easier template conversions and now its the main one I have to work on).

    Thanks in advance
    Andrew;?
    Nothing annoys a non-conformist more than other non-conformists who refuse to conform to the rules of non-conformity.


    Confused is my normal state of mind


  2. #2
    VBAX Master TonyJollans's Avatar
    Joined
    May 2004
    Location
    Norfolk, England
    Posts
    2,291
    Location
    Hi Andrew,

    You can add Fields in Word Table Cells which contain formulae referencing other Cells (or even other Tables).

    You can add them via code if you want.

    You can update Fields in code.

    You can also use FormFields, which work slightly differently, but what you want should be do-able.

    I'm not sure how to be more specific. Perhaps if you could post a specific example I could explain exactly what was needed so you could see how it was done.
    Enjoy,
    Tony

    ---------------------------------------------------------------
    Give a man a fish and he'll eat for a day.
    Teach him how to fish and he'll sit in a boat and drink beer all day.

    I'm (slowly) building my own site: www.WordArticles.com

  3. #3
    Knowledge Base Approver
    Space Cadet VBAX Tutor sandam's Avatar
    Joined
    Jan 2005
    Location
    London
    Posts
    292
    Location
    Thanks Tony. that explains quite a bit. I basically want to set up a table in Word that will calculate values for a bill. i was hoping to get away with as little coding as possible this time because I've done it once before and the module was a mile long (and thats with reusable code pieces. I've been working on it for a while now and i see where I went wrong so, I'll stick to the coding instead. thanks again.

    andrew;?
    Nothing annoys a non-conformist more than other non-conformists who refuse to conform to the rules of non-conformity.


    Confused is my normal state of mind


Posting Permissions

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