Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Remove line spacing
Message
From
13/01/2013 19:17:43
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01562384
Message ID:
01562404
Views:
30
just did it naomi and tried to place the macro into my coding without success. is that what you were suggesting?
this is the macro verbatim:
 Selection.Find.ClearFormatting
    Selection.Find.Replacement.ClearFormatting
    With Selection.Find
        .Text = ".vmd"
        .Replacement.Text = "^m"
        .Forward = True
        .Wrap = wdFindContinue
        .Format = False
        .MatchCase = False
        .MatchWholeWord = False
        .MatchWildcards = False
        .MatchSoundsLike = False
        .MatchAllWordForms = False
    End With
    Selection.Find.Execute Replace:=wdReplaceAll
>Have you tried recording a macro when you change that setting?
>
>>You were right craig.
>>i went to document in word and the option to 'remove space after each paragraph' does solve the issue of the extra lines
>> - question now is how would i do that in the automation coding
>>i have added the following if that's any help. can't seem to find anything obvious in the literature.
>>
>>loSelection.Start=1
>>loSelection.End=len(filetostr(mytext.txt))
>>
>>
>>>Word may be adding spacing between paragraphs. If each line ends with a CR/LF, Word will see it as a new paragraph. You'll have to change it in paragraph settings. Or, remove the CR/LF from the text file.
>>>
>>>>I am trying to create a .doc from plain text and format font and line spacing. the font works i can't find anything about removing line spacing in the document. the text itself does not appear to have any added lines between so it appears to word that is adding it.
>>>>i would like to add a loselection for line spacing of 0
>>>>does anyone know how to do that.
>>>>
>>>>thanks
>>>>k
>>>>
>>>>LOCAL loWord, loSelection, loDocument
>>>>loWord = CREATEOBJECT("Word.Application")
>>>>loWord.Visible = .T.
>>>>loDocument = loWord.Documents.Add()
>>>>loSelection = loWord.Selection
>>>>
>>>>loSelection.Font.Name= "lucida console"
>>>>loSelection.Font.Size= "7"
>>>>loSelection.TypeText(filetostr(mytext.txt))
>>>>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform