J
Jack
How to edit TextFrame in PowerPoint?
Below does open presentetion, but does not edit that text.
Any ideas?
application:=OLE2.CREATE_OBJ('PowerPoint.Application');
OLE2.SET_PROPERTY(application, 'Visible', 1);
-- Return object handle to the Presentations collection
presentations:=OLE2.GET_OBJ_PROPERTY(application, 'Presentations');
x_paikka := 30;
-- Open the required Presentation
args := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(args, x_dir||'\Test.ppt');
ole2.add_arg(args,0);
presentation := ole2.invoke_OBJ(presentations,'Open', args);
ole2.destroy_arglist(args);
x_paikka := 60;
-- VB macro
-- ActiveWindow.Selection.SlideRange.Shapes("Text Box 29").Select
-- ActiveWindow.Selection.ShapeRange.TextFrame.TextRange.Select
--
ActiveWindow.Selection.ShapeRange.TextFrame.TextRange.Characters(Start:=5,
Length:=7).Select
-- ActiveWindow.Selection.TextRange.Text = "36 745"
args := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(args, 'Text Box 29');
slides := OLE2.GET_OBJ_PROPERTY(presentation, 'SlideRange', args);
OLE2.SET_PROPERTY(slides, 'Value', '36 745');
OLE2.DESTROY_ARGLIST(args);
Below does open presentetion, but does not edit that text.
Any ideas?
application:=OLE2.CREATE_OBJ('PowerPoint.Application');
OLE2.SET_PROPERTY(application, 'Visible', 1);
-- Return object handle to the Presentations collection
presentations:=OLE2.GET_OBJ_PROPERTY(application, 'Presentations');
x_paikka := 30;
-- Open the required Presentation
args := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(args, x_dir||'\Test.ppt');
ole2.add_arg(args,0);
presentation := ole2.invoke_OBJ(presentations,'Open', args);
ole2.destroy_arglist(args);
x_paikka := 60;
-- VB macro
-- ActiveWindow.Selection.SlideRange.Shapes("Text Box 29").Select
-- ActiveWindow.Selection.ShapeRange.TextFrame.TextRange.Select
--
ActiveWindow.Selection.ShapeRange.TextFrame.TextRange.Characters(Start:=5,
Length:=7).Select
-- ActiveWindow.Selection.TextRange.Text = "36 745"
args := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(args, 'Text Box 29');
slides := OLE2.GET_OBJ_PROPERTY(presentation, 'SlideRange', args);
OLE2.SET_PROPERTY(slides, 'Value', '36 745');
OLE2.DESTROY_ARGLIST(args);