Events In Word Created from Excel

cmccall95

New Member
Joined
Nov 11, 2019
Messages
13
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:
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
This appears to be a continuation of the discussion you started at: VBA Excel to Word Content Control Running Slowly, where you were provided an answer that you never even acknowledged. Indeed, your code above suggests you simply ignored the advice you were given...
?? No this is a totally different question and has absolutely nothing to do with that question. But thank you for your input
 
Upvote 0

Forum statistics

Threads
1,223,275
Messages
6,171,119
Members
452,381
Latest member
Nova88

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top