473,419 Members | 1,565 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,419 software developers and data experts.

Export access form to ppt

I am toying with the idea of exporting a form (which is by filter) into a ppt presentation. I am currently printing to pdf and there is nothing really wrong with it; other than the seeing half the page empty at the bottom. Anyhow, I found the below code on msdn microsoft. I attempted it with changing employees to match my table, and lastname to match the filtered field. This just gives me a ppt with Hi page 1 and the value within the filered field. (53 slides of this) So, is it possible that something like the below could work by using the form's layout (by the filtered product) without having to copy, paste and manipulate one by one in ppt?



Expand|Select|Wrap|Line Numbers
  1. Sub cmdPowerPoint_Click()
  2.     Dim db As Database, rs As Recordset
  3.     Dim ppObj As PowerPoint.Application
  4.     Dim ppPres As PowerPoint.Presentation
  5.  
  6.     On Error GoTo err_cmdOLEPowerPoint
  7.  
  8.     ' Open up a recordset on the Employees table.
  9.     Set db = CurrentDb
  10.     Set rs = db.OpenRecordset("Employees", dbOpenDynaset)
  11.  
  12.     ' Open up an instance of Powerpoint.
  13.     Set ppObj = New PowerPoint.Application
  14.     Set ppPres = ppObj.Presentations.Add
  15.  
  16.     ' Setup the set of slides and populate them with data from the
  17.     ' set of records.
  18.     With ppPres
  19.         While Not rs.EOF
  20.             With .Slides.Add(rs.AbsolutePosition + 1, ppLayoutTitle)
  21.                 .Shapes(1).TextFrame.TextRange.Text = "Hi!  Page " & rs.AbsolutePosition + 1
  22.                 .SlideShowTransition.EntryEffect = ppEffectFade
  23.                 With .Shapes(2).TextFrame.TextRange
  24.                     .Text = CStr(rs.Fields("LastName").Value)
  25.                     .Characters.Font.Color.RGB = RGB(255, 0, 255)
  26.                     .Characters.Font.Shadow = True
  27.                 End With
  28.                 .Shapes(1).TextFrame.TextRange.Characters.Font.Size = 50
  29.             End With
  30.             rs.MoveNext
  31.         Wend
  32.     End With
  33.  
  34.     ' Run the show.
  35.     ppPres.SlideShowSettings.Run
  36.  
  37.     Exit Sub
  38.  
  39. err_cmdOLEPowerPoint:
  40.     MsgBox Err.Number & " " & Err.Description
  41. End Sub
Feb 1 '14
50 9974
Sorry, been so busy this week. oh darn. I read some stuff on late binding it seems it's not that easy and folks seem to have issues with it. I believe in you :)
Feb 27 '14 #51

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Josh Strickland | last post by:
I am attempting to create an Access database which uses forms to enter data. The issue I am having is returning the query results from the Stored Procedure back in to the Access Form. ...
16
by: David Lauberts | last post by:
Hi Wonder if someone has some words of wisdom. I have a access 2002 form that contains 2 graph objects that overlay each other and would like to export them as a JPEG to use in a presentation....
3
by: sam | last post by:
Can you teach me how to export access file to excel file in VB.net? Thank in advance.
1
by: CoolFactor | last post by:
MY CODE IS NEAR THE BOTTOM I want to export this Access query into Excel using a command button on an Access form in the following way I describe below. Below you will find the simple query I am...
1
by: chaphets | last post by:
access 2003 Need help to export access form into html or xml documents. Advice appreciated, thanks
1
by: ielamrani | last post by:
Hi, I have the following code which works fine. It export current access form record to an excel sheet: DoCmd.OutputTo acOutputForm, "frmsubformtest", acFormatXLS, "C:\Details.xls", True Is it...
16
by: John | last post by:
I am looking for VBA code that will work with Access 2003 to enable dragging and dropping a file/folder name from Windows XP Explorer into an Access form's text box. This is a common functionality...
0
by: JFKJr | last post by:
Hello everyone! I am trying to export Access table data into Excel file in such a way that the table field names should be in the first line of each column in excel file followed by field data, and...
2
by: Susan Littlefie | last post by:
I want to know an easy way to export Access data to Quickbooks.
1
by: achenier | last post by:
Hi, I've been looking for a solution of my VBA code that will allow me to export each of my Access Form to an individual PDF file with the client name. My DB structure is: Id Anunciante ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.