Quantcast
Channel: General Office Development forum
Viewing all articles
Browse latest Browse all 2257

Lack of Office 365 (local instal) COM Automation support - need a definitive list of the versions and their support for automation.

$
0
0

I develop an application that does some PowerPoint automation using embedded interop types (C# App - with VB assembly that does the office automation part)

I've started to get reports that the PowerPoint automation is failing on Office 365.

Here is a sample of a typical customer complaint:

----------------------------------------

not exporting to powerpoint...

We recently migrated from Office2007 to O365. That would be definitely the reason.

But how can we solve this?

-----------------------------------------

I found the following reply to a forum question:

https://social.msdn.microsoft.com/Forums/office/en-US/3c95eea4-641f-4bf0-a166-ecf33177854b/does-desktop-versions-of-applications-in-office-365-packages-support-comautomation?forum=exceldev

But it only states that one version doesn't - and then one version does - doesn't reference a list of all support versions.

Also - later - in that thread - it is shown that the accepted answer is actually incorrect.

A sample of the type of code used to interact is shown here....

    Public Function PositionSlideTitle(ByVal slide As PowerPoint.Slide, ByVal height As Single, ByVal marginX As Single, ByVal marginY As Single) As PowerPoint.Shape
        Dim shapes As PowerPoint.Shapes
        Dim shape As PowerPoint.Shape

        ' get the shapes on the slide
        shapes = slide.Shapes
        ' get the shape that holds the title
        ' if the shapes collection has a title, then this title shape is always in index 1
        If shapes.HasTitle = Office.MsoTriState.msoTrue Then
            ' the title shape can also be accessed by the special property Title
            shape = shapes.Title
        Else
            ' If there was no title - then add one
            shape = shapes.AddTitle()
        End If

        ' position the shape at 0,0 (seems not to want to go there)
        shape.Left = marginX
        shape.Top = marginY
        ' stretch image to fit slide
        shape.Width = slide.Master.Width - (marginX * 2)
        shape.Height = height

        Return shape
    End Function

The project references Microsoft.Office.Interop.PowerPoint, version 11.0.0.0 with it's "Embed Interop Types" set to true.

This has worked for 10+ years, with all versions of office from Office 2003.  We still need the application to support Office 2003 - and it still does perfectly, so referencing newer PIA's isn't an option.

Please help.


Viewing all articles
Browse latest Browse all 2257

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>