Excel To Word Integration

Here my client needed to have Excel/Word Integration. The client had a template in Excel and a template in Word that contained text.  The Word template had some variables that needed to be populated by an Excel file. Mail merge is a useful tool, but the clients needs were a little too complex for that and they wanted a very UI that could do what was required with a single click.

1

We provided two buttons. One to reset the form and another to update the Word template with the details in the Excel spreadsheet.

 

2

Here is a snippet of code you might find useful:

 

Function UpdateRangeAndValue (stRangeName As String, stValue As String, blnDate As Boolean)

        Dim Obj_Word_Rng    As Object

        Set Obj_Word_Rng = Obj_Word_Doc.Bookmarks(stRangeName).Range

        

        If blnDate = True Then

            Obj_Word_Rng.Text = Format(Now(), “MMM DD, YYYY”)

        Else

            Obj_Word_Rng.Text = “”

             Obj_Word_Rng.Text = stValue

        End If

        Obj_Word_Doc.Bookmarks.Add stRangeName, Obj_Word_Rng

       

End Function

View Our Impressive List of Clients
Back to Home Page
Contact Us for a Free Quote