Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Ole/Word Automation - In-place activation.
Message
From
09/05/2001 10:56:04
 
 
To
08/05/2001 18:49:16
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00505062
Message ID:
00505303
Views:
22
Oi Alvaro,

Try this sequence below, and make your adjustments, maybe you can make it work as you wanted. Coding forms by hand is not the worst thing in the world, I use this to create my forms, and it may give you some advantages. Use subclassing at your will, and it turns even beter.

Hope this helps, qualquer coisa me manda um email!

Fernando
 oFormWord = CreateObj ("frmFormWord")
 oFormWord.Show ()

 Clear Events

*=============================================================================

 Define Class frmFormWord as Form
*------ ----- ----------- -- ----

 Top        = 140
 Left       =   4
 Width      = 775
 Height     = 270
 AutoCenter = .T.
 ShowWindow =   0 
 WindowType =   1 
 Caption    = "Ole/Word Automation - In-place activation"

 Add Object cmdQuit as CommandButton with Top           = 246 , ;
                                          Left          = 660 , ;
                                          Height        =  25 , ;
                                          Width         =  75 , ;
                                          Caption       = "\<Quit"

 Add Object cmdPrint as CommandButton with Top          = 246 , ;
                                          Left          = 550 , ;
                                          Height        =  25 , ;
                                          Width         =  75 , ;
                                          Caption       = "\<Print"

 Add Object cmdEdit as CommandButton with Top           = 246 , ;
                                          Left          = 440 , ;
                                          Height        =  25 , ;
                                          Width         =  75 , ;
                                          Caption       = "\<Edit"

 Add Object oleObject as OLEControl   with Top          =   1 , ;
                                           Left         =   4 , ;
                                           Height       = 240 , ;
                                           Width        = 775 , ;
                                           OleClass     = "Word.Document"    , ;
                                           DocumentFile = "C:\TEMP\TESTE.DOC", ;
                                           AutoSize     = .F.
                                           AutoActivate = 0

 Procedure cmdQuit.Click
*          ------- -----
           ThisForm.Release
 EndProc
 
 Procedure Activate
*          --------
 EndProc

 Procedure Init
*          ----
 EndProc

 Procedure QueryUnload
*          -----------
           This.cmdQuit.Click
           NoDefault
           Return .T.
 EndProc

EndDefine
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform