Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem with OLE bound control
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00554800
Message ID:
00555005
Vues:
17
Hi!

Why not prepare the entire report in the Word document and print Word document using Word instead of using the VFP report and OLE Bound control? You can use Word OLE automation. Something like following (not sure about syntax, find correct samples around here):


oWord = CreateObject('Word.Application')
oWord.Documents.Add
oWord.ActiveDocument.TypeText('Something')
oWord.ActiveDocument.PrintOut({a lot of parameters})
oWord.ActiveDocument.Close({parameters to do not ask confirmation for saving})
oWord.Quit

BTW, you can make Word object instance visible for user, so user can edit whatever required and then print. VFP applciation can wait for that moment by checking if Word or document is still opened. After that close the word )if it is still opened) and continue VFP app.

Find also help file for alll objects in the Word, this will help you program it. Youc an also do it easy way - start macro writing in Word, do something that you want be done by VFP program, save macro, open Visual Basic Editor, find your macro there and you have pure VB code for Word! Now convert it to VFP (it is not hard, when you will have problems - post VB code here and we will help to convert it).

HTH.

P.S. Wooah! Why such large photo?

>Since I can't get SEARCH to work, I'll have to post this question:
>
> I have a problem with bulleted lists using Word documents with the VFP 6.0 OLE Bound Control. If a bulleted list is interrupted by a new page, the printout using the Bound Control restarts the list numbering back at 1 on the next page.
>
>For example, 1, 2, and 3 are on Page 1, but 4, 5, and 6 are on Page 2.
>
>When the report form prints page 2, the 4, 5, and 6 are numbered 1, 2, and 3, even though the page before has the 1, 2, and 3 numbers. When you go back and look at the Word document, it is still correct. It is only the OLE Bound Control that handles it wrong.
>
> I have to find a way to continue the bulleted list with the correct continuation on the next page, since these printed pages are used during flight testing of airplanes. We cannot have the pilots communicating with the tower about "Number 1 says....." when no one knows whether it is the first Number 1 or the second Number 1.
>
> Right now, I am searching the Internet for any Active X controls that I can test to see if they might handle this problem correctly, but if I find one, it is going to have to work with the Report Form as well. Does anyone have any suggestions?
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform