Search code examples
ms-accessvbapowerpoint

Fill data in PowerPoint Template through Access using VBA?


I'm developing a small project, using Access, SQL, Word and PowerPoint, the goal of this project ist too allow the user, to add is personal information, in Access, throught user forms, register that information in the SQL database, and passe it to templates in Word and PowerPoint.

The templates are loaded and the dynamic data in them, filled, when pressing a button (word or powerpoint) in an access form.

So, with word, it's all working well through the use of bookmarks, but in powerpoint, things get tricky, there are no bookmarks (damn you Microsoft).

So i've been searching SO and Google, but cant seem to find a example that works for me. All of the examples talk about creating a new powerpoint presentation, that is not want i'm looking for.

The goal is just to add the dynamic data, in this case textboxes and a photo, and leave the static data in the template.

So the flow would be something like this

SQL (database) -> ACCESS (user interface) -> Word and Power Point (Final Template).

If anyone has an example of how just to start this i would be very gratefull for your help.

Thank you all for your time in this matter.


Solution

  • I'm not clear on what the problem is exactly. Do you need to know how to start a new presentation based on your existing template? If so, you'd open your template file as though it were a presentation then immediately save it AS a presentation (rather than starting a new presentation and applying the template, which will give you only the design but none of the contents .. the slides ... of the template file).

    I also don't understand why you'd expect all applications, Word, Excel, PowerPoint and the rest, to be identical. If Word did everything that PowerPoint does, there'd be no need for one or the other of them. It stands to reason that they'll have different feature sets, as appropriate to their usage.

    In any case, to add, say, user name as needed throughout a presentation, it's quite quick to look at each shape to see if it contains text, and if so, to replace, say %%USERNAME%% with the actual user name you're working with.

    You can similarly look for special text, say PICTURE:portrait, within a shape and if found, insert a picture, size it to match the shape then delete or hide the original shape.