riatin Posted April 25, 2023 Posted April 25, 2023 Hello, I'm trying to add an image to a publisher page but I am not having much luck. Any help would be appreciated. Local $PublisherApp = ObjCreate("Publisher.Application") Local $Document = $PublisherApp.Open(@scriptdir & "\" & "example.pub") $PublisherApp.ActiveWindow.Visible = True Local $Page = $Document.Pages(1) Local $Shape = $Page.Shapes.AddShape(1, 144, 144, 72, 144) $Shape.Shapes.AddPicture("C:\path\pic.jpg", 0, 0, -1, -1) I'm new to editing office applications through autoit, so I'm having some difficulty.
riatin Posted April 25, 2023 Author Posted April 25, 2023 Oh, it wouldn't let me edit, but the error I get is: 'The requested action with this object has failed' and points to the 'AddPicture' command.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now