How to make output of report to Powerpoint (1 Viewer)

MichealDon

Registered User.
Local time
Today, 16:31
Joined
Nov 25, 2017
Messages
29
Hi All,
I have a database, and a report on event of button click.
I can also export the report to output with .PDF format or .XPS format.
Now I want to export the report with output .PPTX (powerpont)
I visit the link below several time, also download the Demo file for learning. But it seem to be a little bit different to my database.
https://www.access-programmers.co.uk/forums/showthread.php?t=291319
In the Demo, with some controls OLE_Graphic to be defined on it, the code VBA will copy these OLE_Graphic control to Powerpoint Application then exporting output for PPTX format.
For try to testting, I copied some code from it to my database but the error measage informed " Compile error : User-defined type not defined " at the row
" Dim PowerPoint As PowerPoint.Application "

I do not know whether I can copy the output pdf, or XPS format to paste to Powerpont slide with how to code it.

Thanks very much for helping me to build the report output with the PP format and help access beginner like me to learn more .
Thank again.
MichealDon
 

Gasman

Enthusiastic Amateur
Local time
Today, 23:31
Joined
Sep 21, 2011
Messages
14,048
You are probably missing the Powerpoint library.

Go into the VBA editor (Alt + F11) and select Tools/Referencesand scroll down to 'Microsoft Powerpoint xx Object library' where xx is your version of Office and select the checkbox.

Then try again, or Compile using Debug/Compile from the ribbon bar.

HTH
 

MichealDon

Registered User.
Local time
Today, 16:31
Joined
Nov 25, 2017
Messages
29
You are probably missing the Powerpoint library.

Go into the VBA editor (Alt + F11) and select Tools/Referencesand scroll down to 'Microsoft Powerpoint xx Object library' where xx is your version of Office and select the checkbox.

Then try again, or Compile using Debug/Compile from the ribbon bar.

HTH

Thank you very much,
I have come to the site to select the Microsoft Powerpoint library.
The error is solved.
But I do not know how to copy the output report with pdf (or XPS) format to code it as picture to paste in the Powerpoint
Thank more for help and support from all of you.
Best Regards,
MichealDon
 

JHB

Have been here a while
Local time
Tomorrow, 00:31
Joined
Jun 17, 2012
Messages
7,732
..
But I do not know how to copy the output report with pdf (or XPS) format to code it as picture to paste in the Powerpoint
Why do you want the report in pdf (or XPS) format when you paste it in a Powerpoint file?
 

MichealDon

Registered User.
Local time
Today, 16:31
Joined
Nov 25, 2017
Messages
29
Why do you want the report in pdf (or XPS) format when you paste it in a Powerpoint file?
Dear JHB,
First of all thank you stop by my topic and your support.
Relate to your question. I want to explaint my database.
The database with some text fields, picture fields (Pics Path), and the report with these picures to be inserted on it.
The report to be printed (exported) to .pdf format file or .XPS file for mail sending everyday. Beside, the quality of pictures attached in the report is good when exporting. This is the reason I have printed it with these format.
I also looking for the new way to export the report to .JPG format or the orther Picture format such as .PNG. But , Access application seem to be not support for picture formats.
Now, for the purpose of presentation the report daily. So I want to export the report to picture or Powerpoint (with fair quality picture).
I do not know how to do the idea by my knowledge, I hope that the Access Community will help me to solve the trouble.
Thank you for your support.
Best regards,
MichealDon
 

Gasman

Enthusiastic Amateur
Local time
Today, 23:31
Joined
Sep 21, 2011
Messages
14,048
You can insert a pdf into Powerpoint, but I do not know whether it will refresh if you overwrite with a new copy.?
 

JHB

Have been here a while
Local time
Tomorrow, 00:31
Joined
Jun 17, 2012
Messages
7,732
Nothing that you mention here is undoable, (except exports to JPG / PNG format which I have not yet tried it can be done).
But I've some more questions.
..
The database with some text fields, picture fields (Pics Path), and the report with these picures to be inserted on it.
What is these pictures about, is it a graph or what?
Why do you store them?

Could you post your database with some sample data (and the name of the report/form) + a picture or something visually, how you want the result?
 

MichealDon

Registered User.
Local time
Today, 16:31
Joined
Nov 25, 2017
Messages
29
You can insert a pdf into Powerpoint, but I do not know whether it will refresh if you overwrite with a new copy.?

Dear Gasman,
Thank you very much,
Would you like to give me the solution with Code VBA for declare variant and code insert the .pdf ?
If you can, i will try to do it.

Nothing that you mention here is undoable, (except exports to JPG / PNG format which I have not yet tried it can be done).
But I've some more questions.

What is these pictures about, is it a graph or what?
Why do you store them?

Could you post your database with some sample data (and the name of the report/form) + a picture or something visually, how you want the result?
Dear JHB,
In my database, some fields contain paths of picture in Folder Picture (Pics. JPG, or PNG), with the code to load pictures from the Pics Folder to Forms and Report.
I will upload my database on tomorror when I will be at my office.
Thank you very much,
MichealDon
 
Last edited:

MichealDon

Registered User.
Local time
Today, 16:31
Joined
Nov 25, 2017
Messages
29
Dear JHB,
I am looking for the way to attach my database in here, but I could not find how to do. Visit some other topics, I can see some file attached from other member. The function for uploading file in the forum is available.
Maybe I am a new member, so the function is limit to me.
I upload my Database in the link.
For Data running, some code in Modules, or code for button "Report Fault Complain" must be edited for the path of Folder Pictures correctly.

https://drive.google.com/drive/folders/175DznvOym1MJ1fWDwAjBVRzLFT9k5vd6?ogsrc=32

Thanks
MichealDon
 
Last edited:

JHB

Have been here a while
Local time
Tomorrow, 00:31
Joined
Jun 17, 2012
Messages
7,732
The only requirements to upload is that a database file is under 2MB, and that you've to posted 10 post, else the file must be zipped.

For uploading database here:
Scroll down a little until you see the button "Manage Attachment", (click the button and follow the instruction).
If you file is to big, click "Compact & Repair" in MS-Access, then zip it.

Sorry I can't look at your database before tomorrow, because I'm away from home today.
 

JHB

Have been here a while
Local time
Tomorrow, 00:31
Joined
Jun 17, 2012
Messages
7,732
Could you please upload your database here, because it seems I can't get access to it follow your link.
 

MichealDon

Registered User.
Local time
Today, 16:31
Joined
Nov 25, 2017
Messages
29
Could you please upload your database here, because it seems I can't get access to it follow your link.

Dear JHB,
Thank you very much.
I have just uploaded my database from file TEST.ZIP7
My computer had been only installed some Copyright Software, so I only compressed my database by .Zip7.
I do not know the Zip can be suitable to upload on the Forum.
If not, after working , I will upload the database with Zip on my computer at my home

Note : The File Zip7 could not be uploaded on here.
I will upload the new one later

Thank you again
MiChealDon
 

MichealDon

Registered User.
Local time
Today, 16:31
Joined
Nov 25, 2017
Messages
29
MiChealDon

Dear JHB,
This is the Zip attached,
For making the report by button "Report... ", you should modifiy some code in modules and VBA button command for the path of Folder Picture.
Thank again
Best Regards,
MichealDon
 

Attachments

  • TEST.zip
    1.6 MB · Views: 192

JHB

Have been here a while
Local time
Tomorrow, 00:31
Joined
Jun 17, 2012
Messages
7,732
Now I've made it so that the pdf file is loaded into a Powerpoint file.
Remember to change the path of Folder Picture both in the code and in the table "Tbl_CGFaultControl".
Also remember to add the reference to Powerpoint Object Library if you add the code into another database.
The pdf file need to be closed before it can be inserted in the Powerpoint file.
Database file attached.
 

Attachments

  • FAULTS COMPLAINT.zip
    762.4 KB · Views: 231

Gasman

Enthusiastic Amateur
Local time
Today, 23:31
Joined
Sep 21, 2011
Messages
14,048
Dear Gasman,
Thank you very much,
Would you like to give me the solution with Code VBA for declare variant and code insert the .pdf ?
If you can, i will try to do it.

MichealDon

My idea was just to output the report to pdf and have that file referenced in the PP presentation. As I mentioned, not sure if it will refresh, so have tried a quick test and it does not, so scrap that idea. Sorry.
 

MichealDon

Registered User.
Local time
Today, 16:31
Joined
Nov 25, 2017
Messages
29
The only requirements to upload is that a database file is under 2MB, and that you've to posted 10 post, else the file must be zipped.

For uploading database here:
Scroll down a little until you see the button "Manage Attachment", (click the button and follow the instruction).
If you file is to big, click "Compact & Repair" in MS-Access, then zip it.

Sorry I can't look at your database before tomorrow, because I'm away from home today.

My idea was just to output the report to pdf and have that file referenced in the PP presentation. As I mentioned, not sure if it will refresh, so have tried a quick test and it does not, so scrap that idea. Sorry.

Dear JBH and Gasman,
What a fantastic !
With your code to make report output to Powerpoint, I can save time and take more effective on my work.
I want to thank all of you, expecially thank to JBH for your help and support new members to learn more for keep moving in the Access World strongly.
Thanks and Best Regards,
MichealDon
 

JHB

Have been here a while
Local time
Tomorrow, 00:31
Joined
Jun 17, 2012
Messages
7,732
You're welcome, good luck with you project! :)
 

Mohd87

New member
Local time
Today, 23:31
Joined
Aug 9, 2023
Messages
5
لقد قمت بذلك الآن ليتم تحميل ملف pdf في ملف Powerpoint.
تذكر تغيير صورة المجلد في كل من التعليمات والجدول "Tbl_CGFaultControl".
تذكر أيضًا إضافة المرجع إلى مكتبة كائنات Powerpoint إذا أضفت الرمز إلى قاعدة بيانات أخرى.
إغلاق ملف pdf قبل إدراجه في ملف PowerPoint.
تم إرفاق ملف قاعدة البيانات.

Now I've made it so that the pdf file is loaded into a Powerpoint file.
Remember to change the path of Folder Picture both in the code and in the table "Tbl_CGFaultControl".
Also remember to add the reference to Powerpoint Object Library if you add the code into another database.
The pdf file need to be closed before it can be inserted in the Powerpoint file.
Database file attached.
How add 8 slide
 

Gasman

Enthusiastic Amateur
Local time
Today, 23:31
Joined
Sep 21, 2011
Messages
14,048
Please do not hijack another member's thread.
Post you own question. By all means refer to this thread.
 

Mohd87

New member
Local time
Today, 23:31
Joined
Aug 9, 2023
Messages
5
I have an Access database to extract the comparisons between two months in PDF format, but I need to export the report to PowerPoint format, and the report consists of 8 pages. I need to add 8 slides in PowerPoint. I found the previous example, so I modified the export code, so the result was that it opens 8 slides, but only adds the first sheet of the report. It is required to add 8 pages of the report to 8 new slides in PowerPoint
 

Users who are viewing this thread

Top Bottom