Skip to content

Category Archives: Office Interoperability

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 [...]

Creating CAB files using MakeCab.exe

02-May-08

If you are working with Sharepoint or Infopath sometime you need to use makecab.exe, it is a command line utility to create cab files from Microsoft. You can use makecab utility from command prompt.
Command line output from MakeCab/?

MAKECAB [/V[n]] [/D var=value ...] [/L dir] source [destination]
MAKECAB [/V[n]] [/D var=value ...] /F directive_file [...]
sourceĀ  – File [...]

Printing Infopath forms

25-Apr-08

While working in Infopath forms, there may some situations where you may need to Print the InfoPath form. But the problem of Infopath API is that we can’t specify the printer name for printing. Like this one

InfoApp.XDocuments(0).PrintOut()

The printout method doesn’t have any parameters like Printer name or port etc. As a workaround you can export [...]

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 [...]