[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 326
  • Last Modified:

Infragistics and MS Word 2007

For those of you who are familiar with the Infragistics Windows Form controls -- is there any way to integrate their output with a MS Word 2007 document?  Such that I could have a pie chart or a bar graph in a Word document?
0
Tom Knowlton
Asked:
Tom Knowlton
  • 2
  • 2
1 Solution
 
Expert1701Commented:
Hi Knowlton,

Could you take a screen shot of the control with the data rendered, and then embed that in to Word as a bitmap?
0
 
Tom KnowltonWeb developerAuthor Commented:
I've thought about doing that.  It may end-up coming to that.

How easy is it to do this in C#?
0
 
Expert1701Commented:
You can take a screen shot of the control by using,

  Bitmap bitmap = new Bitmap(control.Width, control.Height);
  using (Graphics g = Graphics.FromImage(bitmap))
    g.CopyFromScreen(PointToScreen(control.Location), Point.Empty, control.Size);

After saving the bitmap, I believe you can use Document.InlineShapes.AddPicture to get that file in to your Word document (I know you have more experience with Word automation than I do).
0
 
Tom KnowltonWeb developerAuthor Commented:
Thank you for your help.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now