Pookiemeister
Well-known Member
- Joined
- Jan 6, 2012
- Messages
- 626
- Office Version
- 365
- 2010
- Platform
- Windows
I have a userform created in word 2010. It asks the user for certain information then it adds the content of the form into the blank word document. The code below is the current code. I haven't written anymore yet, until I figure out how to add it to the word document. As you can see, the document formatting is already preassigned. I just need to figure out how to add the content from the userform to the word document. Any help would be greatly appreciated, is what I am wanting to do is even possible? Thank You
Code:
Private Sub cmdbtnSubmit_Click()
Application.Templates.LoadBuildingBlocks
Selection.ParagraphFormat.Alignment = wdAlignParagraphCenter
Selection.Font.Name = "Arial"
Selection.Font.Bold = True
Selection.Font.Size = 48
'Selection.PasteAndFormat (wdFormatOriginalFormatting)
'Selection.MoveUp Unit:=wdLine, Count:=15
Dim sLineSelect As String
Select Case True
Case Is = optSt
sLineSelect = "St"
Case Is = optUh2
sLineSelect = "Uh2"
Case Is = optKr
sLineSelect = "Kr"
Case Is = optIA
sLineSelect = "IA"
Case Is = optUh5
sLineSelect = "Uh5"
Case Is = optPouch
sLineSelect = "Pouch"
End Select
End Sub