Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Writing to a Word document - paragraphs
Message
From
07/12/2011 10:34:33
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows 7
Miscellaneous
Thread ID:
01530519
Message ID:
01530532
Views:
65
UPDATE: Nope, that made no difference - dangit


Here is the code I'm using to set up that section.
** add section
oDoc.Sections.Add()
** add section break
oDoc.PageSetup.Sectionstart = 0  && wdSectionContinuous
sRange = oDoc.Sections[2].Range
sRange.Text = ""
sRange.ParagraphFormat.KeepTogether = .t.
sRange.ParagraphFormat.LineSpacingRule = 0  && wdLineSpaceSingle
srange.Paragraphs.LineSpacing=10

oApp.Visible = .T.    && temporary so I can watch what's happening

** Set up columns
oDoc.Sections[2].PageSetup.textcolumns.setcount(2)
SectionCnt = 2
So, if I'm following your suggestion, I should add the line "sRange.ParagraphFormat.KeepWithNext = True" right after the "KeepTogether" line. I'll give that a try and see what happens


>Mark all lines you want to be together and:
>.KeepWithNext = True
>.KeepTogether = True
>
>
>
>>Borislav,
>>
>>Unfortunately, been there - tried that. Word still regards it as beginning a new paragraph.
>>
>>D
"You don't manage people. You manage things - people you lead" Adm. Grace Hopper
Pflugerville, between a Rock and a Weird Place
Previous
Reply
Map
View

Click here to load this message in the networking platform