I have a macro in Excel that copies an Excel range, creates a word table in a new or existing word document, and then populates the word table. The last column is then populated with a combobox. My client now wants it to move down to the next combobox once a selection is made. Is this even possible to do without writing a code inside of the word document?
Snippet from my code
If oRow.Cells(1).Range.ParagraphFormat.Alignment = wdAlignParagraphRight Then
On Error Resume Next
Set objCC = wrdApp.ActiveDocument.ContentControls.Add(wdContentControlDropdownList, oRow.Cells(7).Range)
If Err.Number = 5941 Then GoTo Nexti:
objCC.Title = "Interpretation"
'If objCC.ShowingPlaceholderText Then
objCC.SetPlaceholderText , , "-"
objCC.DropdownListEntries.Add "Valid"
objCC.DropdownListEntries.Add "Significant Difference"
objCC.DropdownListEntries.Add "WNL"
objCC.DropdownListEntries.Add "Slightly Below Expectations"
objCC.DropdownListEntries.Add "Below Expectations"
objCC.DropdownListEntries.Add "Far Below Expectations"
Debug.Print Len(oRow.Cells(7).Range.Text)
'End If
Else
Debug.Print "Did nothing---" & Len(Trim(Replace(oRow.Cells(1).Range.Text, Chr(160), "")))
End If
Nexti:
Snippet from my code
If oRow.Cells(1).Range.ParagraphFormat.Alignment = wdAlignParagraphRight Then
On Error Resume Next
Set objCC = wrdApp.ActiveDocument.ContentControls.Add(wdContentControlDropdownList, oRow.Cells(7).Range)
If Err.Number = 5941 Then GoTo Nexti:
objCC.Title = "Interpretation"
'If objCC.ShowingPlaceholderText Then
objCC.SetPlaceholderText , , "-"
objCC.DropdownListEntries.Add "Valid"
objCC.DropdownListEntries.Add "Significant Difference"
objCC.DropdownListEntries.Add "WNL"
objCC.DropdownListEntries.Add "Slightly Below Expectations"
objCC.DropdownListEntries.Add "Below Expectations"
objCC.DropdownListEntries.Add "Far Below Expectations"
Debug.Print Len(oRow.Cells(7).Range.Text)
'End If
Else
Debug.Print "Did nothing---" & Len(Trim(Replace(oRow.Cells(1).Range.Text, Chr(160), "")))
End If
Nexti: