I'm using a table with an OLE Field.
I would like to be able to open a Word Document by doubleclick on the field
UIObject.
Or, the default is to open the document in Paradox UI, I'd like to open it
in a Word Windows, without using the rightclick and the default Popupmenu.
I knew that I can use an OLE variable associated with a TCursor, but if I
use this solution, I must create a PushButton to validate modifications made
in the Word Windows. I prefer the interactive solution type because the
validation is automatic.
Have you an idea, for example, to use directly, the Open option of the
default Popupmenu ?
Many Thanks !
Gaël PLANTIN
Denn Santoro
President
Resource Development Associates
http://www.RDAWorldWide.Com
Offices in the United States and Germany
Providing solutions to health care, business, governments and non-profits since
1982
I look for a solution which allow me to use, in objectpal, the popupmenu
option "Open Word Document", instead of the default doubleclic. this last
one, open the document in the Paradox UI, not in a word's windows.
I have never done this beacuse I don't like keeping oelobjects in
tables. I prefer keeping documents on disk.
Anyway this works in Paradox 7 SP 4 for me.
PUSHBUTTON's VAR WINDOW
var
oleobj ole
endvar
PUSHBUTTON
var
tc tcursor
endvar
tc.attach(o1)
oleobj=tc.o1
oleobj.edit("",0)
--
Bertil Isberg
CTECH
FAQ newsgroup: corel.wpoffice.paradox-faq
Paradox Buglist: http://w1.826.comhem.se/~u82608896/
remove spamfilter (reversed) to reply
thanks Bertil and Dennis !
I knew the solution that Bertil show me, but, in this case, I have to
validate the change made on oleobj by objectpal, because I do not refer to
the table itself. The users may forgot to do it. I've tried to do it in a
the Form.setFocus, but, the users are able to switch between Paradox and
Word or Excel severals times befaore they want to validate...That's why I
try to use the Popupmenu which work directly on the table, so it is not
necesseraly to validate.
I have choose, like you said me Dennis, a separate table linked with a 1:1
relationship.
I'm a teacher and I have made an application, In paradox, to propose some
exercices, with explanations and illustrations, with Quiz, all in Paradox
Table.
In the same time, I ask the students to make some documents using the
concept they have seen in the explanation.
It is more simple for me to keep that document in a OLE Field to apply the
correction grid, since I have not to find a document which is, often not
name as I would like...
Thanks for your help !
Gaël PLANTIN
I'm not sure I understand what you want to do.
Here's another way of doing it.
On Page object
var
oleobj ole
endvar
Two buttons - Edit Word doc and Save
Edit word Doc
edit()
oleobj=o1 ; o1 is the ole field from the table shown in the form
oleobj.edit("",0) ; open ms word
Save
o1=oleobj ; Update ole field with oleobj
endedit()
That's all
On page or fom level, declare a variable
oleobj ole
in ole fields arrive event
dodefault
oleobj=o1 ; o1 is the ole field in the table
oleobj.edit("",0)
in ole fields depart event
edit()
o1=oleobj
endedit()
Here's another suggestion
In ole field's mouseDouble() event
disableDefault
edit()
self.menuAction(30666) ; undocumented menuaction
The second solution is what I'm looking for !
Gaël PLANTIN