Results 1 to 8 of 8

adding rows into word document

Threaded View

  1. #2
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: adding rows into word document

    Use Word's builtin importfacilities.

    Sub snb()
      with getobject("E:\OF\import.doc")
        .Content.InsertFile "E:\OF\adressen 001.xls", "A1:K20"
        .save
      end with
    end sub
    You can also link an Excel file to a Word document so that it will be updated automatically.


    If the Word document doesn't exist already:
      With CreateObject("Word.document")
        .Content.InsertFile "E:\OF\adressen 001.xls", "A1:K20"
        .SaveAs "E:\OF\import 001.doc"
        .Close
      End With
    Last edited by snb; 07-17-2011 at 11:45 AM.



Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1