Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Word Auto: Merging Cells in table
Message
From
27/07/2009 16:48:58
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Word Auto: Merging Cells in table
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01414868
Message ID:
01414868
Views:
112
Hi all,

Doing some Word automation: example on pg 94 in MSFT Office Automation with VFP says there are 2 ways to merge cells in a table. I got the first one working with this code:
* see Pg 94 in MS Office Automation for merging; will use the method getting a reference to the first
* cell, then the 3rd cell and then invoking .Merge() passing the second cell to merge with

STORE loRow.Cells(1) TO loCell_1
STORE loRow.Cells(3) TO loCell_3

* merge the cells
loCell_1.Merge(loCell_3)
but could not get the "2nd method" to work i.e. I did not know how to create an object reference to a range of cells (e.g. cells 1 to 3 above). This was the code that was in the book but it did not explain how to get "oCells"
oCells.Merge()
Thanks,
Albert
Next
Reply
Map
View

Click here to load this message in the networking platform