Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Word Table --> Fox Pro code ?
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00740670
Message ID:
00743177
Views:
37
>Terry,
>Thank you very much. A few questions, however: First, when you say define the define, do you mean in vfp?
Yes, you would define the Word Table inside VFP. You can kickstart the process by recording a macro inside Word. Set the macro recorder on and then go through the motions of formatting a table inside. Start with a simple one. Then paste the code to a VFP PRG. Modify to the pasted code to work within VFP. For example, VBA will show a "True", VFP reads a ".T.".

> Second, what do you mean when youi write "my PELS to inches was 71.94" Have no idea what that means.
Word formats the table in inches, so for a certain table deminsion, VBA (as recorded by the macro), may show:
.Selection.Cells.SetWidth(.6,0)
VFP output is in PELS (im not sure why the conversion is necessary), but it is, so, to make the above statement express the deminsion as predicted from a VFP/VBA rendering, we would need to:
.Selection.Cells.SetWidth(.6*PELsToInches,0)
to define this particular section of the table from inside VFP.

Here's some sample code to define a specific cell:
oTable.Cell(1,1).Select
.Selection.SelectColumn
.Selection.Cells.SetWidth(.6*PELsToInches,0)
.Selection.ParagraphFormat.LeftIndent = -.07*PELsToInches
.Selection.ParagraphFormat.Alignment = 2
Have you used the Word macro recorder to save your keystrokes yet?
Imagination is more important than knowledge
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform