Print the Full Contents of an Excel UserForm TextBox
Question details
Print all text in a scrollable Excel UserForm TextBox, including content outside the visible area.

- Product
- Microsoft Excel and Microsoft Word
- Device & OS
- not provided
- Scenario
- A UserForm TextBox contains thousands of characters that need to be printed in full.
- Observed behavior
- Printing the UserForm prints only the visible portion of the scrollable TextBox.
Make sure desktop Microsoft Word is installed and available for automation, and that a printer is configured. Save the Excel workbook as a macro-enabled file and enable macros if prompted.
Print the TextBox through a temporary Word document
Use this VBA approach to print long text without relying on the visible UserForm area or worksheet cell height.
The macro creates a hidden Word instance, copies the complete TextBox value into a new document, and prints it synchronously before closing Word. It does not save the temporary document.
In Excel, press Alt+F11, find your UserForm in the Project Explorer, and open its code window. Add a command button to the form if you do not already have a print button.
Paste the following code into the UserForm code window. Replace CommandButton1 with your button name and TextBox1 with your TextBox name: Private Sub CommandButton1_Click() Dim wordApp As Object Dim wordDoc As Object Dim errorMessage As String On Error GoTo PrintError Set wordApp = CreateObject("Word.Application") wordApp.Visible = False Set wordDoc = wordApp.Documents.Add wordDoc.Content.Text = Me.TextBox1.Value wordDoc.PrintOut Background:=False GoTo CleanUp PrintError: errorMessage = Err.Description CleanUp: On Error Resume Next If Not wordDoc Is Nothing Then wordDoc.Close SaveChanges:=False If Not wordApp Is Nothing Then wordApp.Quit SaveChanges:=False On Error GoTo 0 If Len(errorMessage) > 0 Then MsgBox "Could not print: " & errorMessage, vbExclamation End Sub
Run the UserForm in Excel, enter or load the text, and click the print button. Check the printer output to confirm that the full text is included.

Print long text with WPS Writer
WPS Office is a free, lightweight alternative with a familiar interface for working with documents and spreadsheets. For a manual workflow, copy the TextBox content into WPS Writer and print it; this does not fix Excel's UserForm printing behavior.

Frequently Asked Questions
Why does printing the UserForm omit some TextBox text?
UserForm.Print prints the form as displayed, so text outside the visible portion of a scrollable TextBox is not included. Send the TextBox value to a document to print the full text.
Can I print the text from a worksheet cell instead?
You can place text in a worksheet cell and print the sheet, but a cell's maximum row height can prevent very long content from displaying and printing in full. A Word document is better suited to text spanning multiple pages.
Does Word have to appear on screen for the macro to work?
No. The macro sets Word's Visible property to False, creates a temporary document, and closes the Word instance after printing.
What should I check if the macro cannot print?
Confirm that desktop Word is installed, a default printer is configured, and macros are enabled. In the UserForm code, also check that the button and TextBox names match your controls.




