title: Push and pull word content control data to and from Designed VBA form
body: <p>I got a question, a couple in fact. (sorry for not formatting correctly, i tried but it just doesnt "work")
  I've designed a template for my job application processes, got the content controls working fine pushing data from my form to the document. 
  Now i wonder, how to retrieve such data back into the form when i open the document again? </p>
  
  <p>Working short word code: </p>
  
  <pre><code>  Option Explicit
     'Coded by Etrola Limited-Now terminated /Erik L Thoresen
     'Pending change
     'Revision 1 CC and form
  
    Private Sub cmdFillForm_Click()
     'Fill letter elements (content controls) from userform, works fine to fill text in controls
      Dim cc As ContentControl
      For Each cc In ActiveDocument.ContentControls
          If cc.Title = "ccCompany" Then
              cc.Range.Text = Me.txtCompany
              Exit For
          End If
      Next cc
      End Sub
  </code></pre>
  
  <p>How should I then best place code to place this? 
  <code>Debug.Print cc.Range.text</code> to keep my form "live to data in doc?" </p>
  
  <p>And now for my second question: In my Excel database, a log of different activities performed, i got the urge of creating my application from a range of declared cells as filename, and the data from those shall also be entered into content controls when calling the form to create a new application with a filename given by these ranged cells. Lets say: 
  I have an active line in a table in that sheet, the last row with 5 or more cells in a row. </p>
  
  <p>I can also have entered any number of interesting jobs for a date, and by a click of a floating or other form of way to create these applications type of menu, all are created with the desired data. </p>
  
  <ol>
  <li>How do i call that template?</li>
  <li>How do i define either ranged cells (by date would be nice, but also ActiveRow)?</li>
  </ol>
  
  <p>Excel code: </p>
  
  <pre><code>Option Explicit
  Sub TransferDataToWord()
    Dim wdApp As Word.Application
    Dim wdDoc As Word.Document
    Dim strDocName As String
    Dim MyRange As Range
    Dim fNamePt1 As String
    Dim fNamePt2 As String
    Dim fNamePt3 As String
    Dim fNamePt4 As String
    Dim fNamePt5 As String
    fNamePt1 = Range.Count '?
    fNamePt2 = Range.Count '?
    fNamePt3 = Range.Count '?
    fNamePt4 = Range.Count '?
    fNamePt5 = Range.Count '?
  
    On Error Resume Next
  
    Set wdApp = GetObject(, "word.application")
    Set wdDoc = wdApp.Documents.Add
      wdDoc.Content.InsertAfter Range
        If Err.Number = 429 Then
         Err.Clear
          Set wdApp = CreateObject("word.application")
        End If
      wdApp.Visible = True
        strDocName = "C:\Myfolder\" 'Søknad' "&amp;fNamePt1 &amp;fNamePt2 &amp;fNamePt3 &amp;fNamePt4)
        If Dir(strDocName) = "" Then
          MsgBox "The file " &amp; strDocName &amp; vbCrLf &amp; "wasn't found " &amp; vbCrLf &amp; "C:\MyFolder\.", vbExclamation, " The document doesn't exist "
         End Sub
       End If
  
  wdApp.Activate
   Set wdDoc = wdApp.Documents(strDocName)
     If wdDoc Is Nothing Then 
       Set wdDoc = Documents(strDocName)
         wdDoc.Activate
         wdDoc.MyRange.Paste
         wdDoc.Save
        wdApp.Quit
  
  Set wdDoc = Nothing
  Set wdApp = Nothing
  Application.CutCopyMode = False
  </code></pre>