Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Viewing/amending word document from VFP form
Message
From
13/05/2003 06:39:20
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
13/05/2003 05:15:54
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Miscellaneous
Thread ID:
00787305
Message ID:
00787630
Views:
19
>Cetin
>
>If using the WebBrowser control, is there a way of disabling the message that comes up asking if you wish to Open, Save or Cancel when trying to open a document?
>
>Thanks
>Kev
>
>PS I've given up on the OLEControl, you're right, it's a nightmare! and it's not really what I expected.
>

Kevin,
Sorry I couldn't understand (don't see it). ie:
oForm = Createobject('myForm')
oForm.Show
Read Events

Define Class myForm As Form
  Height = 500
  Width = 790

  Add Object wbrowser	As OleControl ;
    with Height = 450, Width = 790, ;
    OleClass = 'Shell.Explorer.2'
  Add Object DocSelect As CommandButton ;
    with Caption = 'Select DOC',;
    Top = 455, AutoSize = .T.

  Add Object AutomateWord As CommandButton ;
    with Caption = 'Automate',;
    Top = 455, Left=650,AutoSize = .T.

  Procedure AutomateWord.Click
    Local oWord
    oWord = Thisform.wbrowser.Object.Document.Application
    oWord.ActiveDocument.Range.Font.Color = Rgb(0,0,255)
    oWord.Selection.Font.Bold = .T.
  Endproc

  Procedure wbrowser.Refresh
    Nodefault
  Endproc

  Procedure DocSelect.Click
    Local lcDOC
    lcDOC = Getfile('DOC')
    If !Empty(lcDOC)
      This.Parent.wbrowser.Navigate2('file://'+lcDOC)
    Endif

  Procedure QueryUnload
    Clear Events
  Endproc
Enddefine
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