Solved

Replace Form Feed character with Line Feed character in MS Word 2007

Posted on 2010-11-19
7
1,285 Views
Last Modified: 2012-05-10
Is there a method in MS Word to replace a form feed character with a line feed character? I copy text files into Word. Some of the files have a segment separator that is a form feed character. Some have segment separators that are line feed characters. The line feed character formats the file perfectly in Word. The form feed does not. An example of each is attached.
LineFeed.txt
FormFeed.txt
0
Comment
Question by:StampIT
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 9

Accepted Solution

by:
jkunrein earned 250 total points
ID: 34173126
You can search for ^028 and replace with ^011. Make sure wildcards are being used.


ee-word-find-and-replace.png
0
 

Author Closing Comment

by:StampIT
ID: 34173379
Thanks jkunrein. Works like a charm.

 Where would there be a listing of codes that correspond with special characters like 028 = form feed and 11 = line feed ?
0
 
LVL 9

Expert Comment

by:jkunrein
ID: 34173624
I couldn't tell you where a list is. My Google Fu is doing poorly right now.

But, I'll tell you how I got the code for the form feed. I used a macro that tells me the code of each character that is selected. Since I got this from someone else, I'm including the author's name. It is not my creation.

Public Sub cmd_DisplayAllCharacterCode()
' Procedure :   cmd_DisplayAllCharacterCode
' Description:  Displays the ascii character code of the selected string.
' Copyright:    Chris Greaves Inc.
' Inputs:       None
' Returns:      Nothing
' Assumes:      Nothing
' Side Effects: The selection may change.
' Tested:       By a call from the user.
    Dim strText As String
    strText = Selection.Text
    Dim strCodes As String
    strCodes = ""
    Dim i As Integer
    For i = 1 To Len(strText)
        strCodes = strCodes & " " & intCharacterCode(Mid$(strText, i, 1))
    Next i
    Application.StatusBar = strCodes
End Sub

Open in new window

0
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

Author Comment

by:StampIT
ID: 34173724
Thanks jkunrein. How did you use it? I am not familiar with using a macro in Word.
0
 
LVL 9

Expert Comment

by:jkunrein
ID: 34173926
Copy the code exactly as it shows up in that previous message.
In Word, press Alt+F11.
In the left-hand pane, open up the Normal folder. Open up a module (possibly NewMacros or Module1 or just create a new module).
Paste the text in the pane on the right side.
In Word, you can press Alt+F8 to bring up a list of macros. Choose cmd_DisplayAllCharacterCode.
You'll see the codes in the status bar at the bottom. You can place the cursor before a single character to see that code. If you can also select a portion of text (though there is a reasonable max you can select).
0
 
LVL 9

Expert Comment

by:jkunrein
ID: 34173939
Although, I just realized that there is a function attached to this. Copy this and place it on the same page as the other code.
Public Function intCharacterCode(strCh As String) As Integer
' Procedure :   intCharacterCode
' Description:  Return the unicode of the character.
' Copyright:    Chris Greaves Inc.
' Inputs:       STRING
' Returns:      INTEGER
' Assumes:      Nothing
' Side Effects: The selection may change.
' Tested:       By a call from the user
    Dim intunicode As Integer
    intunicode = AscW(strCh)
    If intunicode < 0 Then intunicode = intunicode + 65536
    intCharacterCode = intunicode

End Function

Open in new window

0
 

Author Comment

by:StampIT
ID: 34174408
jkunrein,
       I will try this. Will probably have more questions.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Shortcuts in Word Just the other day I had a training for Microsoft and they wanted me to show how well the new Windows and Office behaved on a touch device, which by the way is great, but it was only then that I realized that using keyboard shortc…
A few years ago I was very much a beginner at VBA, and that very much remains the case today.  I'll do my best to explain things as I go in the hope that other beginners can follow.  If you just want to check out a tool that creates a Select Case fu…
This video walks the viewer through the process of creating envelopes and labels, with multiple names and addresses. Navigate to the “Start Mail Merge” button in the Mailings tab: Follow the step-by-step process until asked to find the address doc…
This Experts Exchange video Micro Tutorial shows how to tell Microsoft Office that a word is NOT spelled correctly. Microsoft Office has a built-in, main dictionary that is shared by Office apps, including Excel, Outlook, PowerPoint, and Word. When …

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question