Doubt regarding Hyperlink and Code

Mahendra

Registered User.
Local time
Today, 13:39
Joined
Sep 19, 2013
Messages
62
Hello All,

Am a Novice to Ms Access. I have a doubt regarding a project. I have seen a form which have a button. If we click on a button in a form then a ppt is opened.

I have seen a code for that backend process and it's bit difficult for the beginners like me to understand it. The code is used for copying the data from Excel to ppt and then displaying the ppt with the excel data.

They have used the code like

Option Compare Database
Option Explicit

Private Sub TotalReport_Click()
DoCmd.SetWarnings False

DoCmd.OutputTo acOutputQuery, "Months", "ExcelWorkbook(*.xlsx)", "D:\Files\Database\Excel\Monthstime.xlsx", False, "", , acExportQualityPrint

DoCmd.OutputTo acOutputQuery, "Quarters", "ExcelWorkbook(*.xlsx)", "D:\Files\Database\Excel\Quarterstime.xlsx", False, "", , acExportQualityPrint


MsgBox "Success!!", vbInformation, ""

DoCmd.SetWarnings True

FollowHyperlink "D:\Personal\NewFolder\PPT\TotalPresentation.pptx"

Like the code continues..................

My Doubt (as an alternative):

We can just insert the excel data into ppt's via manually and then Instead of writing that code, I think we can just link with the hyperlink of the ppt to that button right?

Is there any logical difference between these two? Writing up a code or simply setting the hyperlink address in the background.

Could anyone of you can clarify my doubt please?
 
I see no code that moves the data from Excel to PPT so I suspect that an object/link has been created in the PPT document to the Excel file, which displays the contents of the Excel file in the PPT doc.

Currently, the code is simply creating a spreadsheet from the 'Months' and 'Quarters' queries and opening a ppt document.
 

Users who are viewing this thread

Back
Top Bottom