Greetings all,
I have been asked to write a report in 2013 Access that fills in from a form entry. In the report there are several paragraphs that are of a good length, and vary in size.
They then are exported into MS Word. No problem thus far, but. . .
When the .rtf is pulled up in Word, each line is separated from the previous line, and it is a hassle to reconnect each line, plus speed is why this is being created, and connecting all lines slows the process down significantly.
Question: Is there a macro in Access (Or Word) that would keep the paragraphs together as one continuous typing?
A friend suggested this in Word, but it doesn't seem to help much.
Code:
Sub FixParagraph()
'
' FixParagraph Macro
'
'
Dim selectedText As String
Dim textLength As Integer
selectedText = Selection.Text
' If no text is selected, this prevents this subroutine from typing another
' copy of the character following the cursor into the document
If Len(selectedText) <= 1 Then
Exit Sub
End If
' Replace all carriage returns and line feeds in the selected text with spaces
selectedText = Replace(selectedText, vbCr, " ")
selectedText = Replace(selectedText, vbLf, " ")
' Get rid of repeated spaces
Do
textLength = Len(selectedText)
selectedText = Replace(selectedText, " ", " ")
Loop While textLength <> Len(selectedText)
' Replace the selected text in the document with the modified text
Selection.TypeText (selectedText)
End Sub
Any suggestions Please!
Yarbs