Powerpoint 2007

P

Peter B

I have written a program in VB.NET that connects to Powerpoint. The below
code works when connected to PowerPoint 2000, XP (2002) and 2003, but does
not work in 2007. To test this, I have removed all references to older
versions of PowerPoint ie 9, 10 and 11, and added a reference to Powerpoint
2007 to force VB to use the version 12 object model. I have stepped through
the VB.NET code and have confirmed that the Presentation Object I am using is
version 12.

The code is:

Shp2 = Sld.Shapes.AddTable(1, iColumns, iLEFT, siTop, Sld.Master.Width -
(iLEFT * 2), 380)


With Shp2.Line
.ForeColor.RGB = gCOLOR_BLUE_DARK
.Weight = 0
End With

The Sld object is declared as a Microsoft.Office.Interop.PowerPoint.Slide
The Shp2 object is declared as a Microsoft.Office.Interop.PowerPoint.Shape

The Sld object has been set to an instance of one of my slides in the
current presentation. The AddTable command works fine.

It errors
All I am trying to do is change the Line colour of a table that I have
created.

When checking the RGB property in the watch window it says:

<error: an exception of type: {System.ArgumentException} occurred>

Does anyone have any ideas on how to change the Line Colour of a table (ie
the border colour of the Table)

Thanks for any help in advance.
 
P

Patrick Schmid

If the project is VS.NET 2003 or older, please zip it up and email it to
me. You can get my email from my website.

Patrick Schmid
 
A

Adam D

Hi Peter B,
I'm having the exact same problem.
Did you find a solution?

Thank you.
Adam D.
 
A

Adam D

Congrats Patrick.
Sorry to be the guy asking for help...
But,
Does anyone know of a solution to the line problem in powerpoint?
Is it a known bug in powerpoint vba? or is there a work around?

Thanks

Adam

Patrick Schmid said:
What's One Nose? Is it a sticky yellow note on the refrigerator <eg>.
Sorry, but none of your jokes about ON can compete with one made by a
German MVP :p I posted in the German MVP group that I was now an MVP and
wrote (in German): I am now a new MVP (OneNote).
A German MVP asked me whether MVP's where assigned grades now, because I
had written "without grade" in parenthesis after MVP. To help with the
joke: "ohne Note" in German means "without grade"...

Patrick Schmid [OneNote MVP]
--------------
http://pschmid.net
***
Office 2007 Beta 2 Technical Refresh (B2TR):
http://pschmid.net/blog/2006/09/18/43
***
Customize Office 2007: http://pschmid.net/office2007/customize
OneNote 2007: http://pschmid.net/office2007/onenote
***
Subscribe to my Office 2007 blog: http://pschmid.net/blog/feed
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top