How to change color scheme for publisher in VBA running on Access application.


S

sjgregory

Hello, I am creating an application in MS Access that opens various Publisher templates, modifies and saves them.

I have set up references to MS Publisher, and using the following variables can add shapes etc. via code:

Dim pubApp As publisher.Application
Dim pubDoc As publisher.Document

Then, after creating instances of the variables, the following, for example, works:

Set shpTextBox = pubDoc.Pages(4).Shapes.AddTextbox _
(Orientation:=pbTextOrientationHorizontal, _
Left:=100, Top:=200, _
Width:=100, Height:=40)

BUT, when I try to change the colorscheme, using:

pubDoc.ColorScheme = pubApp.ColorSchemes("WildFlower")

I get an "invalid procedure call or argument error."

Any ideas for a fix are greatly appreciated.
 
Ad

Advertisements


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

Similar Threads


Top