Skip to content

Tag Archives: Office Interoperability

Covert PowerPoint Slides to Images

09-Oct-09

Today one of my colleague comes with a problem; he want to display a Powerpoint presentation in his Sharepoint site. But we didn’t got any direct way to display it. They we tweaked the code, to export the Slides to images and display it using the a custom slideshow web part, like the AjaxToolkit slideshow [...]

Calling word Macros from .Net

20-Sep-07

While using Word automation with .Net sometimes it is required ti call, word macro’s from C# or VB.Net.
Here is the code to call word macros from VB.Net.

Dim WordApp As New Microsoft.Office.Interop.Word.Application
CType(WordApp, Object).GetType().InvokeMember("Run", Reflection.BindingFlags.Default Or Reflection.BindingFlags.InvokeMethod, Nothing, CType(WordApp, Object), New Object() {"helloworld"})

In the code, helloworld is the macro name.Or you can simply call WordApp.Run(“helloworld”) will also [...]