How to programatically (using VBA) to modify the charts in Word 2007 - vba

Folks,
I would like to write a VBA macro to modify the charts in a Word document but I don't know how ? I used the old school trick below with no hope:
Select a Chart in an open document
Start Macro Recording
Modify the chart
Stop Recording
Edit the macro
The surprise here is that the macro is empty !!
Any advice ?

You may find some useful information in this related question: VBScript and multilevel OLE?

Related

Word VBA to refresh embedded Excel chart

I have embedded charts in a Word doc. When I update the data in Excel, so that the chart in the Excel workbook updates, and then go to the Word doc, I can manually select the embedded chart, select Design > Refresh Data, and the embedded chart in Word updates to show the new data.
When I try to record the Word VBA to do that, it won't let me do those actions.
I've looked everywhere I can think of in Word's object browser. I see that I can identify the embedded chart like this:
thisdocument.InlineShapes(1)
But I don't see how to refresh it. What do I need to do?
I found the answer here:
http://answers.microsoft.com/en-us/msoffice/forum/msoffice_word-msoffice_custom/what-is-the-vba-equivalent-of-refresh-data-for/b8405aca-716a-e011-8dfc-68b599b31bf5
thisdocument.InlineShapes(1).LinkFormat.Update
It worked fine in my tests.
And to break the link (in the word template) after updating, to avoid inadvertently updating the chart to one from a later run showing different data:
thisdocument.InlineShapes(1).LinkFormat.BreakLink

Generate PowerPoint presentations with Excel sheets / charts embedded in it programatically

So what my client wants to accomplish seems pretty simple. We will have PPTX file template with a few Excel sheets embedded in it, and a few charts too.
We have created such template file. We are able to extract it, update excel files that sit in ppt/embedded directory with new ones, and pack it back.
The problem is, the display values of the tables or charts do not update automatically when such file is opened. You have to double click on a spreadsheet table or chart to trigger "edit mode". When you leave it the charts are updated.
We figured that internally, PowerPoint is doing screenshots of tables or charts, and uses it to display presentation. This is probably to allow presentation players that do not come with Excel to correctly render the presentation with embedded sheets.
Is there a way I can programatically update the screenshots of tables/charts? Is there some sort of API from Microsoft that would allow me to do that, like "MS Office API".
Maybe there is some way to have MS office configured/scripted, so I send it a file, it runs a VB script on it and returns updated value? I figured I can actually trigger update to screenshots with VB script. But I don't know if I can orchestrate Office program to do what I want.
Help? :)

How do I use Excel to insert blocks into AutoCAD drawings?

I'm trying to use Excel to create AutoCAD drawings. I have a list of product numbers and I'd like to use VBA so that upon hitting a button it will find a block or a drawing file of every product on the list and paste them into an AutoCAD drawing (to a specific point would be a bonus).
So far I've found code that will read from two columns in Excel and will plot a polyline in ACAD using those columns as coordinates. It's very simple but not exactly what I want. Does anyone have suggestions or example code that does something similar? I've found some online using the "ThisDrawing." object but Excel isn't recognizing that so I've reached a stand still. I have all day tomorrow to work on it, so I'll be doing a lot more searching, but any help is definitely appreciated. Thank you
Autodesk provide free downloads on their website so that you can add the VBA IDE into AutoCAD.
Then, inside the AutoCAD IDE you start a new VBA project.
Add a reference to your Excel library so that you can read the Excel spreadsheet.
You need to look up on:
ThisDrawing.ModelSpace.InsertBlock
In the AutoCAD VBA manual. It tells you what various parameters. But they are straightforward - origin, scale, rotation, path to block.
When you call the InsertBlock routine it will create a AcadBlockReference object. You can do any further customization on that object.

How to automate PowerPoint spell-check?

I have searched high and low to find some way to try to automate spell-check in VBA for PowerPoint, but have not been able to uncover anything. I'm looking for similar functionality to what Word and Excel offer in automating spell-check, but for PowerPoint
The routine I'm after would be like (psuedo):
For Each Mispelling in ActivePresentation.Mispellings
Mispelling.IgnoreAll = True
Next
ActivePresentation.Save
Any help would be appreciated!
Progammatically checking spelling in PowerPoint is not available. It's rather unfortunate as I've needed this myself before too (to bulk spell-check multiple PPTs programmatically). At best you could interop with Word and send the text there to be spell-checked and then send back to PowerPoint, but I image this would be rather clunky.

How to Run VBA Macro in Word Doc after being Merged by external application

We are using the XML or Word ML format from Office 2003.
How do I get a macro to run after a MS Word ML document has been merged by another application (not Word) called SIMS by Capita.
How can I get the Macro to run after a merge, when the document is being previewed?
The Word-document doesn't know that it has been merged by another application. The only way that comes to my mind is to check for changes when the doc is opened and then run your macro.