+ All Categories
Home > Documents > CSC 240 (Blum)1 Random Topics: OLE Objects, Mail Merge and XML Exporting.

CSC 240 (Blum)1 Random Topics: OLE Objects, Mail Merge and XML Exporting.

Date post: 30-Dec-2015
Category:
Upload: baldric-wiggins
View: 214 times
Download: 0 times
Share this document with a friend
Popular Tags:
69
CSC 240 (Blum) 1 Random Topics: OLE Objects, Mail Merge and XML Exporting
Transcript

CSC 240 (Blum) 1

Random Topics: OLE Objects, Mail Merge and

XML Exporting

CSC 240 (Blum) 2

OLE Objects (specifically images)

CSC 240 (Blum) 3

Open the Player table and in Design View add

description for the fields made the last time.

CSC 240 (Blum) 4

Add a new field called Picture and choose

OLE Object as the Data Type.

CSC 240 (Blum) 5

OLE definition in Webopedia.com

CSC 240 (Blum) 6

Access’s OLE Object Data Type

CSC 240 (Blum) 7

Save Keith Adams’ picture.

• Return to the Eagles roster page http://www.philadelphiaeagles.com/team/default.jsp

• Click on the Adams, Keith hyperlink.

CSC 240 (Blum) 8

Right click on the picture and choose Save Picture As …

CSC 240 (Blum) 9

Click on the Create New Folder button and

rename the file. Click Open.

CSC 240 (Blum) 10

Click on Save.

CSC 240 (Blum) 11

Similarly pull down images of David Akers and Ian Allen.

CSC 240 (Blum) 12

Open the Player table in DataSheet View. Right click in the Picture field for the Keith Adams record and choose Insert Object …

CSC 240 (Blum) 13

In the dialog box, select the Create from File radio

button and check the Link checkbox.

CSC 240 (Blum) 14

Click on Browse ... and locate and highlight

the file and click OK.

CSC 240 (Blum) 15

The file’s path should be filled in the File textbox. Click OK.

CSC 240 (Blum) 16

Result of inserting the OLE object.

CSC 240 (Blum) 17

Close the table. Click on the drop-down arrow next

to the New Object button and select AutoForm.

CSC 240 (Blum) 18

Result of AutoForm on Player table.

CSC 240 (Blum) 19

Double click on the jpg icon on the form. A package that displays the jpg image (in this case Internet Explorer) should arise. Save the Form.

CSC 240 (Blum) 20

Right click on the next image file, choose Open With/Choose Program and select Microsoft Paint from the list and click OK. Or open Microsoft Paint under Programs/Accessories and use File/Open ….

CSC 240 (Blum) 21

Go to File/Save As …. Choose 256 Color

Bitmap as the type. Click Save. Answer Yes.

CSC 240 (Blum) 22

Similarly save David Akers’ image as a bitmap. Close Paint.

CSC 240 (Blum) 23

Return to the Player table in DataSheet view. Right click in the Picture field of the David Akers record. Choose Insert Object …

CSC 240 (Blum) 24

Add the David Akers bmp file. Check Display as Icon.

CSC 240 (Blum) 25

Repeat for the Ian Allen image but do not

check Display as Icon this time.

CSC 240 (Blum) 26

Result of adding bitmap files. Note the field displays “Bitmap Image” instead of “Package”

CSC 240 (Blum) 27

Result in Form view. The bitmap not displayed as icon can be seen.

CSC 240 (Blum) 28

Close the database. Return to Paint and change

the bitmap files and save them. Close Paint.

CSC 240 (Blum) 29

Reopen the database. The display as icon image should change, the other should not.

CSC 240 (Blum) 30

Mail Merge

CSC 240 (Blum) 31

Open a Word document, go to Tools/Letters and Mailings/Mail Merge

CSC 240 (Blum) 32

Select the type of document for the merge.

Proceed to the next step.

CSC 240 (Blum) 33

Make further choices about the document to be merged.

CSC 240 (Blum) 34

Select recipients from an existing list. Browse.

CSC 240 (Blum) 35

Find the database using the dialog box. Click Open.

CSC 240 (Blum) 36

Choose the table or query for the merge.

CSC 240 (Blum) 37

Select recipients. Sort recipients.

CSC 240 (Blum) 38

Result of recipient selection. Proceed to next step.

CSC 240 (Blum) 39

Insert Date

CSC 240 (Blum) 40

Prepare to add address block to your letter.

CSC 240 (Blum) 41

In the Insert Address Block dialog box, click Match Fields ….

CSC 240 (Blum) 42

Use the Match Fields dialog box to relate the database fields

to those standard to addressing a letter.

CSC 240 (Blum) 43

Matched fields. Address 2 is under Optional.

CSC 240 (Blum) 44

Result of adding Address Block, position cursor to add Greeting.

CSC 240 (Blum) 45

Use the Greeting Line dialog box to select the greeting. We should have had a title field in our database to allow for a more formal address.

CSC 240 (Blum) 46

Document after Greeting Line added. Start

writing your letter.

CSC 240 (Blum) 47

Document after adding body of letter. Proceed to the letter preview.

CSC 240 (Blum) 48

Preview shows examples of your letter. You

can return to previous steps to fix any errors.

CSC 240 (Blum) 49

Another preview obtained by clicked >>. Proceed to merge the letter.

CSC 240 (Blum) 50

We will choose to create a merged document

rather than print – to save on paper.

CSC 240 (Blum) 51

Created a six page document with each

page being a letter to a different recipient.

CSC 240 (Blum) 52

Save merged letters document.

CSC 240 (Blum) 53

Save document that did merging.

CSC 240 (Blum) 54

Open the database and add a new record.

CSC 240 (Blum) 55

Opening document that did merging.

CSC 240 (Blum) 56

Quickly run through merge process.

CSC 240 (Blum) 57

Repeating previous procedure (not from

scratch) yields a 7-page document.

CSC 240 (Blum) 58

Exporting XML

CSC 240 (Blum) 59

Open up the database, select a table, go to File/Export.

CSC 240 (Blum) 60

In the export dialog box, choose XML from the Save as Type drop-down list. Then click Export.

CSC 240 (Blum) 61

Webopedia.com definition of XML.

CSC 240 (Blum) 62

For our case, check all the boxes. Click OK.

CSC 240 (Blum) 63

Webopedia.com definition of XSD.

CSC 240 (Blum) 64

Webopedia.com definition of XSL.

CSC 240 (Blum) 65

View files created in Windows Explorer.

CSC 240 (Blum) 66

The .htm file opened in Internet Explorer.

CSC 240 (Blum) 67

The .htm file opened in Notepad.

CSC 240 (Blum) 68

The .xml file opened in Internet Explorer.

CSC 240 (Blum) 69

The .xml file opened Notepad.


Recommended