Hi,
I am embedding various things into a Microsoft Word document. I want to
embed and automate a chart control. I can embed an Excel.Chart.8 into my
Word document manually (no problemo), but I cannot find this control on the
"Add/Remove Components..." dialog in the VB.NET editor. What I want to do
is use automation to create an Excel.Chart.8, then using the reference
returned, build a graph from my VB.NET program. What do I cast it to and
what/how do I get the approriate Excel references into my software (at
present, to get Word, I have "Microsoft.Office.Core", "Office" and "Word"
references). What do I include for Excel?
' In my VB.NET code I write the following (to embed a graph):
Dim theNewShape As InlineShape = m_Document.InlineShapes.AddOLEObject
(ClassType:="Excel.Chart.8", _
FileName:="", _
LinkToFile:=False, _
DisplayAsIcon:=False, _
Range:=m_Application.Selection.Range)
' Set its size...
theNewShape.Width = theShape.Width
theNewShape.Height = theShape.Height
' Store a reference to the OLE for later...
m_TrendOLE = CType(theNewShape.OLEFormat.Object, ?????????????????)
' Build the graph (my function to build the graph in the Word Document using
Automation...)
BuildTheGraph(m_TrendOLE) 1 2974
I got it. I needed XL5EN32.OLB.
"Robin Tucker" <id*************************@reallyidont.com> wrote in
message news:ci*******************@news.demon.co.uk... Hi,
I am embedding various things into a Microsoft Word document. I want to embed and automate a chart control. I can embed an Excel.Chart.8 into my Word document manually (no problemo), but I cannot find this control on the "Add/Remove Components..." dialog in the VB.NET editor. What I want to do is use automation to create an Excel.Chart.8, then using the reference returned, build a graph from my VB.NET program. What do I cast it to and what/how do I get the approriate Excel references into my software (at present, to get Word, I have "Microsoft.Office.Core", "Office" and "Word" references). What do I include for Excel?
' In my VB.NET code I write the following (to embed a graph):
Dim theNewShape As InlineShape = m_Document.InlineShapes.AddOLEObject
(ClassType:="Excel.Chart.8", _ FileName:="", _ LinkToFile:=False, _ DisplayAsIcon:=False, _ Range:=m_Application.Selection.Range)
' Set its size...
theNewShape.Width = theShape.Width theNewShape.Height = theShape.Height
' Store a reference to the OLE for later...
m_TrendOLE = CType(theNewShape.OLEFormat.Object, ?????????????????)
' Build the graph (my function to build the graph in the Word Document using Automation...)
BuildTheGraph(m_TrendOLE)
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Alex Grichener |
last post by:
I want to output a graph to the screen (X-axis, Y-axis, and
all of the other things that constitute a graph), that will
continuously plot something as time goes forward. So I will
be constantly...
|
by: Mick Turner |
last post by:
I have connected to SQL Server database (server-side vbscript) and read some
data from the tables. This works correctly. I now have the data in an array
(server-side).
I have to draw a...
|
by: PeteCresswell |
last post by:
I've been to
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/mschrt/html/vbobjtitleobject.asp,
but still don't have a clue.
For example, I've got a chart object namde...
|
by: Patrick.O.Ige |
last post by:
I have a code below and its a PIE & BAR CHART.
The values now are all static but I want to be able to pull the values from
a database.
Can you guys give me some ideas to do this?
Thanks
...
|
by: Saintor |
last post by:
This is for A97 in runtime or MDE mode.
My intent was to define a temporary query using the recordsetclone property
/ filter / orderby. The controlsource of my chart would be based on a
grouped...
|
by: Kuna |
last post by:
Hi All,
I am trying to create a gantt chart in php by getting data from
database. I am using WindowsXp OS and having php-4 and my-sql DB. I
have installed the JPGRAPH package to my system and...
|
by: stupidintern |
last post by:
Hi,
This is my first post here so please be patient.
Here is my question:
I am trying to include a chart in my VB form. I do it this way:
I drop the Microsoft Graph Chart Control (from Unbound...
|
by: The Frog |
last post by:
Hi guys,
I have never touched really on this area before with forms and
reports, and now I would like to be able to incorporate some graphs /
charts for a new little app I am building, and I...
|
by: gpalade |
last post by:
Hy,
i'm using c# to create a powerPoint presentation that contains charts. I've added the chart(s) using Graph.Chart, it looks like this:
Graph.Chart objChart =...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
| |