Inject Open XML into an Open PowerPoint Presentation - powerpoint

I'm looking for a way to inject PresentationML and/or DrawingML into an open PowerPoint 2007/2010 presentation using the Open XML SDK or just System.IO.Packaging. There is an article on doing this with Word, but in that example it is using the Range.XML routine in Word's object model, which I cannot find an equivalant for in PowerPoint's object model.
The reason I'm looking to do this is if I have an item on it that the PowerPoint client does not support editing of but that Open XML does (and as a result, PowerPoint will display it). I want to set this myself via a managed-addin (VSTO) on the open presentation. An example would be the underline of text (not that I'm looking for this, but it is an example) - in PowerPoint, you cannot make the underline of text a picture <a:blip/>, but in Open XML you can.
Does anyone know how to do this?

I am using both OpenXML SDK 2 and the Object Model to process presentations.
What I do, simplistic as it sounds, is to save the presentation, close it, perform all the XML modifications I need using OpenXML SDK, and then load the presentation back and continue with the Object Model.

Nope, according to Microsoft support: http://www.ureader.com/msg/10972430.aspx

Related

Excel-Addin with visible form

I have a query on the usage of windows form in excel add-in, application level.
Objective Statement:
Display customized windows form control, similar to a way a chart is being inserted into excel
Custom Pane
I have tried custom pane add-in but it seems to be on a entire workbook level, i need something on a worksheet level
Task Pane
I can't seem to use the task pane in application add-in for excel
Windows Form Control
When I click on a cell in excel i will lose focus to the windows form, i will need the windows to be together with the worksheet, but i can't use showdialog.
Thanks for the help in advance.
From your answer it is hard for me to figure out if you we are looking at a code solution here or something more high level, so I am going to assume that you are looking for a code solution, please correct me if I am wrong.
Have you considered using an OLE object or ActiveX?
There is an example from Microsoft here, how to develop an ActiveX control. (Here is some other walkthrough that I found helpful).
Just to give you a hint how it (the example mentioned above) looks like, here is the screenshot of the compiled example that I added onto the excel sheet:
ActiveX control can be added both manually, or by code, so I could imagine that you could also provide a COM Excel Add-in that would add some buttons onto the ribbon, that when pressed, would add the desired controls onto the sheet.

How to open autocad and draw shapes?

I have a question.I have an application that users can draw various shapes on it.
I'd like to have a button so when it is clicked autocad opens and my shapes appear in autocad.how can I do this?
thanks in advance.
You need to save your shapes in dwg or dxf format. If you're already using ObjectARX it should be easy, if not, you might want to read about it. You can then open the file normally or run Autocad with the file name as a parameter to open it.
You have to write an AutoCAD plugin by using AutoCAD.Net SDK instead of writing application out of AutoCAD.
AutoCAD has no feature like office application for controlling it like Microsoft.Office.Interop for accessing from out of it.

Programatically configure Office 2010 Word Ribbon via VBA

Is it possible to configure a Ribbon (e.g. adding a tab etc.) in Office 2010 programatically via VBA? I.e. by writing VBScript code in a macro.
Br. Morten
You can manipulate a Ribbon tab and its controls using VBA, but you cannot create one. Not with the Object Model anyway. The best you could do - somehow - is to get some kind of OPC dll (like an ActiveX component) that handles opening/relationships/closing of OPC documents (like .docx documents) and old school MSXML for creating a ribbon definition and adding it to the package.
Have a look at this blog post for Excel
http://www.xtremevbtalk.com/showthread.php?t=265636
and this one for Word
http://www.wordarticles.com/Shorts/RibbonVBA/RibbonVBADemo.htm
If your UI is static, i.e. you don't need to programatically change the behavior of, or add/remove UI elements on the fly, you can define a customUI within a macro-enabled template. You can use your VBA functions as call-backs for the UI elements defined in the XML.
Have a look at this guide. In a nutshell, you define a customUI\customUI14.xml file within the .dotm archive. This XML describes your custom ribbon elements using this schema.
This definitely works for Word templates (.dotm files). I think a similar approach works for any OOXML format.

Load word document content to PrintDocument

I have a .doc or .dot file and I'd like to view it in PrintPreviewDialog. I heard that I only can view it if I can load the .doc content into PrintDocument object or atleast paint the content on.
Anyone know how to do it?
Thanks in advance
Microsoft Word is required to load the .doc and generate the preview image of document. Embedding Word in your own window used to be possible but support for this is rapidly disappearing. The old DsoFramer control used to be the standard solution but you can no longer download it. It got removed when the Office 2010 beta became available, an ominous sign. Embedding it in a WebBrowser might still be possible, not sure.
The long term solution is to use Word itself to generate the preview. Use the Document.PrintPreview() method.

Access Text Boxes (in a Keynote slide) in AppleScript

Need some help to figure out how to access Text Boxes inside a slide in Keynote with Applescript. I tried to use ASDictionary but I couldn't find anything that would resemble a text box object. I fear that they are not scriptable in Keynote, but perhaps I can access them through Applescript Cocoa bridge? Any thoughts? Thanks!
If (and only if) Keynote doesn't provide access to objects on a slide via AppleScript, then you should do two things:
File an enhancement request at https://bugreport.apple.com/ .
Try examining the Keynote document directly by parsing its XML.
Keynote's XML document format is not documented, as far as I know, but at least you can access it. You just have to be careful about the format changing out from under you.

Resources