• Pasting EXCEL into Protected WORD Form

    Author
    Topic
    #1767734

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

    Viewing 0 reply threads
    Author
    Replies
    • #1776602

      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”).Columns.Count

      wdApp.Documents(“TestDoc”).Tables(1).Cell(i,j).Range.FormFields(1).Result = xlApp.Worksheets(“SheetTest”).Range(“A1:F20”).Cells(i,j)
      Next j
      Next i

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

      Calacuccia

    Viewing 0 reply threads
    Reply To: Pasting EXCEL into Protected WORD Form

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: