Consulting

Results 1 to 3 of 3

Thread: Inserting Table into Word From Excel VBA

  1. #1
    VBAX Newbie
    Joined
    Apr 2007
    Posts
    2
    Location

    Inserting Table into Word From Excel VBA

    Hi,

    How would i do this i've tried this but it displays a 'Wrong Number of arguments error'

    Code:
    .ActiveDocument.Tables.Add NumRows:=2, NumColumns:= _ 2, DefaultTableBehavior:=wdWord9TableBehavior, AutoFitBehavior:= _ wdAutoFitFixed


    Thanks

  2. #2
    Moderator VBAX Wizard lucas's Avatar
    Joined
    Jun 2004
    Location
    Tulsa, Oklahoma
    Posts
    7,323
    Location
    Cross posted in Excel forum this site:
    http://www.vbaexpress.com/forum/showthread.php?t=12513

    Jonn,
    you should at least tell them you have posted elswhere to keep folks from duplicating solutions that have already been posted. Please read this.
    Steve
    "Nearly all men can stand adversity, but if you want to test a man's character, give him power."
    -Abraham Lincoln

  3. #3
    VBAX Wizard
    Joined
    May 2004
    Posts
    6,713
    Location
    I answered this in the Excel post. It is a syntax error. One underscore character is in the wrong place, and another should not be there at all.

Posting Permissions

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