p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   BOOK: Expert Access 2007 Programming ISBN 978-0-470-17402-9 (http://p2p.wrox.com/forumdisplay.php?f=371)
-   -   Question on Chapter 5 (http://p2p.wrox.com/showthread.php?t=69417)

arholly July 16th, 2008 03:01 PM

Question on Chapter 5
 
Hello:
  I've got a question on the portion of chapter 5 that deals with exporting HTML with code. I'm not understanding how to run the code (or similar code) in order to get Figure 5-6. Is that code best run as a macro or how would you recommend. I admit my VB is poor at best, but that code is almost exactly what I need to do.

Thanks for any help.

Arholly


robcooper September 2nd, 2008 04:07 PM

Hi Arholly,

Thanks for your question and for your interest in the book! I apologize for the delayed response.

To call this function, you would call the routine named "CreatePageFromTemplate" that appears before Figure 5-6. The arguments to this routine are:

templateId - This is the ID of a template that is saved in the HtmlTemplates table created at the beginning of the section titled "Creating HTML Files"

fileName - Name of a file to write the results to

You can call this from the Immediate Window, an Access form, or another routine in a standalone module.

For example:
CreatePageFromTemplate 1, "<OutputFile.htm>"

Hope this helps,

Rob Cooper
Lead Software Design Engineer in Test
Microsoft Access Team

co-author: Access 2007 VBA Programmer's Reference
co-author: Expert Access 2007 Programming

This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at microsoft.com/info/cpyright.htm.


All times are GMT -4. The time now is 11:38 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.