Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Word Automation problems
Message
From
29/11/2000 05:16:51
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
29/11/2000 04:28:01
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00446618
Message ID:
00446631
Views:
7
>I have a database with some artikeldetails. For each line i want to create a table in word with the details. I cannot make a table with reccount-rows because sometimes i have to add a picture of the article just before or just after the table. Everything works fine exept for one thing. When to tables directly follow each other there is a blank space between them what causes an empty line. How can I delete this empty line. Here's a part of the code:
>
>go top in "artiktmpl"
>do while !eof("artiktmpl")
>
> **** Insert a before picture if wanted ****
>
> oTable = oDocument.tables.add( oRange, 1, aanttab, wdWord9TableBehavior,2)
> oTable.borders.InsideLineStyle = .F.
> oTable.borders.OutsideLineStyle = .F.
>
> **** Add values to the different cells *****
>
> oRange.move(6) && To jump out of the table
>
> **** Insert a after picture if wanted ****
>
> oRange.move(6)
> oRange.InsertAfter(CR)
> oRange.move(6)
>
> skip in "artiktmpl"
>enddo

Guillaume,
You could surround the 'after table' picture + CR insertion with if :
   oRange.move(6)  && To jump out of the table

if llInsertPic
   **** Insert a after picture if wanted ****

   oRange.move(6)
   oRange.InsertAfter(CR)
   oRange.move(6)
endif
Also I wonder if this executes fast? Instead of setting cell values one by one, you could insert a tab, comma etc delimited text there and TextToTable().
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform