Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MS ActiveX controls as viewers

Status
Not open for further replies.

ChrisRChamberlain

Programmer
Mar 23, 2000
3,392
GB
Hi

To save re-inventing the wheel, perhaps someone could help with this.

I would like to create a read-only viewer form for MS Excel and a read-only viewer form for MS PowerPoint.

There is an ActiveX control called Microsoft Excel Worksheet and an ActiveX control called Microsoft PowerPoint Presentation.

What I don't see is where you set the path\filename property for each control - there is a read-only property called .DocumentFile for each control which can be used if you are using CREATEOBJECT() to create the object.

What would happen is that the viewer form is called from a grid event - automation is an obvious alternative, but as there are other viewers for graphics, RTF/text and PDF files contained within VFP forms, automation would be not be in keeping.

TIA HTH

Chris [pc2]
 
True Automation servers will be registered in the system Registry with all the path information. Because of this you only need to createobject() with the correct name, and the system will locate the file for you. If you drop an OLE control on the form, then it will "know" the proper GUID to look up it's location in the registry - again you don't need to supply this information.

Rick
 
Rick

If you consider the Adobe Acrobat ActiveX control mentioned in another thread, all you need do is (re)state the path\filename.ext for the relevant object property either in the .Init() event of the form or through an object reference.

Whenever you attempt to (re)state the .DocumentFile property value for the MS ActiveX controls, you get an error saying the property is read-only.

So how do you change the file being displayed by the ActiveX control? HTH

Chris [pc2]
 
ChrisRChamberlain

have you considered tryng the object browser as talked about in faq184-2215 I have found this a invaluable tool to view ocx,dll. Attitude is Everything
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top