Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Word Automatic InsertSymbol
Message
De
21/10/2003 11:41:54
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00840443
Message ID:
00840694
Vues:
16
This message has been marked as a message which has helped to the initial question of the thread.
>This worked and is great advice. I am, however, still struggling. What I need is output like this
>
>O Yes
>O No
>O Maybe
>
>Where the O = the box.
>
>Can you possibly tell me the proper sequence of code to get this into a word table?
>
>The whole concept of ranges, etc, is still very confusing to me. I can't be the only one, and I consider myself to be a reasonable smart guy.
>
>Thanks in advance- you clearly have a good handle on the word automation.
>
>DB
#DEFINE wdCollapseStart	1	
#DEFINE wdCollapseEnd	0	
oWord = CreateObject('Word.Application')
With oWord
	.Documents.Add
	oTable = .ActiveDocument.tables.add(.ActiveDocument.Content,1,5)
	oTable.Cell(1,3).Select
	.Selection.Collapse(wdCollapseStart)
	.Selection.InsertSymbol(9675,'',.t. )
	.Selection.TypeText(' Yes'+Chr(13))
	.Selection.InsertSymbol(9675,'',.t. )
	.Selection.TypeText(' No'+Chr(13))
	.Selection.InsertSymbol(9675,'',.t. )
	.Selection.TypeText(' Maybe')
	oTable.Cell(1,1).Select
	.Selection.Collapse(wdCollapseStart)
	.Visible = .t.
	.Activate
endwith
The reason it says it's not a simple .... range is that it expects a range as if you clicked in cell and started to type. With oRange as Cell(r,c) itself it's like you tabbed and selected the whole cell including its invisible markers (honestly I don't know how to explain this in English, hope understandable:).

PS: with 9633 I get a box and thought maybe you were looking for O instead.
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform