Active OLE excel resizing issues
Currently I'm working on an app that uses and OLE control to display an excel inside of a visual basic program I am using the following code to display my excel inside the OLE object....
oleExcel.CreateEmbed ExcelFilePath
oleExcel.Action = 7
oleExcel.SizeMode = 1when I set the oleExcel.Action = 7 to activate the ole control the excel application doesn't seem to stay bound to the ole control it seems to be bigger than the ole object it self. how do i get the active ole excel object to size the correct way.
Answers
Ohio232Stang wrote: when I set the oleExcel.Action = 7 to activate the ole control, the excel application doesn't seem to stay bound to the ole control it seems to be bigger than the ole object it self. how do i get the active ole excel object to size the correct way.
Hi Mike,
Welcome to MSDN forums!
There is one Visual C++ ActiveX Control named DSOFramer.ocx which can be used to host Office documents (not only Excel) in Visual Basic (VB6 and VB.NET) or HTML.
Detail: http://support.microsoft.com/kb/311765
Download the DsoFramer_KB311765_x86.exe package.
Example: Hosting Office in .NET applications
http://blogs.msdn.com/erikaehrli/archive/2005/08/26/hostofficeinnet.aspx
Screenshot:

----------------------------------------------------------------
For Visual Basic 6 questions, please read...
Visual Basic 6 and Earlier forum
http://www.vbforums.com/forumdisplay.php?f=1
More information on VB6:
- Visual Basic 6.0 on MSDN Library
- Visual Basic 6.0 Help and Support
- Visual Basic 6 Support on Windows Vista
- Service Pack 6 for Visual Basic 6.0
- Microsoft Visual Basic 6.0 Common Controls
- Visual Basic 6.0 Upgrade Guidance
- Visual Basic 6.0 Code Advisor
- Visual Basic 6.0 Upgrade Samples
- Visual Basic at the Movies
Regards,
Martin
All Replies
Ohio232Stang wrote: when I set the oleExcel.Action = 7 to activate the ole control, the excel application doesn't seem to stay bound to the ole control it seems to be bigger than the ole object it self. how do i get the active ole excel object to size the correct way.
Hi Mike,
Welcome to MSDN forums!
There is one Visual C++ ActiveX Control named DSOFramer.ocx which can be used to host Office documents (not only Excel) in Visual Basic (VB6 and VB.NET) or HTML.
Detail: http://support.microsoft.com/kb/311765
Download the DsoFramer_KB311765_x86.exe package.
Example: Hosting Office in .NET applications
http://blogs.msdn.com/erikaehrli/archive/2005/08/26/hostofficeinnet.aspx
Screenshot:

----------------------------------------------------------------
For Visual Basic 6 questions, please read...
Visual Basic 6 and Earlier forum
http://www.vbforums.com/forumdisplay.php?f=1
More information on VB6:
- Visual Basic 6.0 on MSDN Library
- Visual Basic 6.0 Help and Support
- Visual Basic 6 Support on Windows Vista
- Service Pack 6 for Visual Basic 6.0
- Microsoft Visual Basic 6.0 Common Controls
- Visual Basic 6.0 Upgrade Guidance
- Visual Basic 6.0 Code Advisor
- Visual Basic 6.0 Upgrade Samples
- Visual Basic at the Movies
Regards,
Martin


