Results 1 to 2 of 2
  1. #1
    mwooding
    Guest

    Pasting EXCEL into Protected WORD Form

    I have a password protected form in word, and want to paste an Excel table into a formfield. Any suggestions?

  2. #2
    calacuccia
    Guest

    Re: Pasting EXCEL into Protected WORD Form

    You'll have to set up the Word form with a table containing as many rows and columns as the Excel table, and put an empty Text FormField..

    Then you can imagine doing this:

    For i = 1 to in xlApp.Worksheets("SheetTest").Range("A1:F20").Rows .Count
    For j = 1 to xlApp.Worksheets("SheetTest").Range("A1:F20").Colu mns.Count

    wdApp.Documents("TestDoc").Tables(1).Cell(i,j).Ran ge.FormFields(1).Result = xlApp.Worksheets("SheetTest").Range("A1:F20").Cell s(i,j)
    Next j
    Next i

    where xlApp is an Excel.Application object and wdApp is a Word.Application object.

    Calacuccia

Posting Permissions

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