VBA to VB.NET conversion

R

rokr

Hello

I want to convet my 2003 vba macros into 2010 powerpoint ribbon buttons

i created a powerpoint ribbon addin and pasted my sample coding. i got errors
for the keywords like "activewindow" . Please help me on this

How to declare activewindow and also reffer some source for learn to creat
powerpoint tools using .net


sample coding: (works in vba
dim c as doubl
dim d as doubl
Sub Pick_position(
On Error Resume Nex
c = ActiveWindow.Selection.ShapeRange(1).To
d = ActiveWindow.Selection.ShapeRange(1).Lef
End Su
Sub drop_position(
On Error Resume Nex
ActiveWindow.Selection.ShapeRange(1).Top =
ActiveWindow.Selection.ShapeRange(1).Left =
End Sub
 
M

Matti Vuori

rokr said:
I want to convet my 2003 vba macros into 2010 powerpoint ribbon
buttons.

I don't believe that... Macros are still macros even when you start them
from the ribbon.
i created a powerpoint ribbon addin and pasted my sample coding. i
got errors. for the keywords like "activewindow" . Please help me on
this.

Look what PowerPoint VBA help says about Activewindow.
Nobody can help you with errors if you don't tell what the error message
is.
sample coding: (works in vba)

There is no such thing as generic "vba". Every application really has its
own version of VBA, as the application's object model mostly defines VBA
in practice. If you have old code from old PPT version, it should work.
If you have old code written for Word, it will not work (except by some
rare cases).
 

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