Ich möchte einen langen Text aus einer TextBox auf der Userform in ein Worddokument (TextFeld) schreiben.
bis 256 Zeichen klappt das super. nur längere Texte leider nicht. Bitte um Hilfe
Dim appWord As Object
Dim strDoc As String
Dim Formular As Object
'Application.Visible = False
strDoc = ThisWorkbook.Worksheets("Daten").Range("C19")
Set appWord = CreateObject("Word.Application")
Set Formular = appWord.Documents.Add(strDoc)
'!!!!!!!!!!!!!!!!
appWord.Visible = False
Application.ScreenUpdating = False
Formular.Activate
If Formular.bookmarks.Exists("Text2_Nachname") Then
Formular.Formfields("Text2_Nachname").result = Range("Nachname").Value & ", " & Range("Vorname").Value
Else
MsgBox "es ist ein Fehler aufgetreten"
End If
Formular.Saved = True
appWord.Documents.Close savechanges:=False
appWord.Quit
Set Formular = Nothing
Set appWord = Nothing