Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Adding text from a specific position
Message
From
13/06/2002 12:09:56
 
 
To
13/06/2002 07:23:18
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00667789
Message ID:
00668021
Views:
20
>How about something similar to this? This will put your info in a table. Your select is only defining two fields, so I only put two columns in the table.
>
>
>SELECT Title,FirstName FROM Employee INTO CURSOR Temp
>loDoc=loWord.ActiveDocument
>loRange=loDoc.Range()
>loRange.Collapse(wdCollapseEnd) && Defined as #DEFINE wdCollapseEnd  0
>loDoc.BookMarks.Add("list",loRange)
>WITH loDoc.BookMarks("list").Range()
>	loTable=loWord.ActiveDocument.Tables.Add(loRange,lnRecCount+1,2)
>	WITH loTable
>		WITH .Rows[1]
>			.cells[1].range.InsertAfter("Title")
>			.cells[1].range.font.name="Tahoma"
>			.cells[2].range.InsertAfter("First Name")
>			.cells[2].range.font.name="Tahoma"		
>			.Shading.Texture=100
>		ENDWITH
>	SCAN
>		WITH .Rows[RECNO()+1]
>		    .cells[1].range.insertafter(ALLTRIM(title))	
>		    .cells[1].range.font.name="Tahoma"
>		    .cells[1].range.font.size=8
>                      .cells[1].range.font.bold=.t.
>		    .cells[2].range.insertafter(ALLTRIM(firstname))	
>		    .cells[2].range.font.name="Tahoma"
>		    .cells[2].range.font.size=8
>                      .cells[1].range.font.bold=.f.
>		ENDWITH
>	ENDSCAN
>	ENDWITH
>ENDWITH
>
I really need to populate the text in a sequence from within the 3 columns definition. So, a table won't do.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Previous
Reply
Map
View

Click here to load this message in the networking platform