View Single Post
 
Old 08-03-2018, 01:33 PM
faustino909 faustino909 is offline Windows 10 Office 2016
Novice
 
Join Date: Jul 2018
Posts: 3
faustino909 is on a distinguished road
Default figured it out.

I did not know I only needed ONE String and ONE Bookmark and just kept appending all data gathered (button caption, textbox, checkbox caption etc)

So I just created 1 bookmark and just kept appending to same string:
partial code, where SmokingData0 is the string attached to one bookmark. So I just kept adding to same string.

Code:
Dim SmokingData0 As Range
 
    Set SmokingData0 = ActiveDocument.Bookmarks("BMsmokingData0").Range
    
    
    If CBsmoking.Value = True Then
        SmokingData0.Text = Me.CBsmoking.Caption & "  "
    End If
    
    If CBcigarettes.Value = True Then
       SmokingData0.Text = "Cigarette smoking since " & TBcigaretteSince.Text & ".  "
        If OBcigaretteStill.Value = True Then
            SmokingData0.Text = SmokingData0.Text & "Currently smokes up to " & TBcigaretteStill.Text & ".  "
            ElseIf OBcigaretteStill.Value = False Then
                If Not TBcigaretteStop.Text = "" Then
                SmokingData0.Text = SmokingData0.Text & "Stopped since " & TBcigaretteStop.Text & ".  "
                End If
        End If
    End If
Reply With Quote