Solved

MS Access 2003 save xml string as PDF

Posted on 2013-02-07
7
574 Views
Last Modified: 2013-02-13
In VBA I am setting a string variable to data from a stored procedure.

Is there any way (In MS Access 2003 using VBA) that I can take that string variable and save straight to a correctly rendered PDF file using the XSLT in the string?

I want a button that produces the PDF

THIS DATA
?xml-stylesheet type='text/xsl' href='S:\Assignment Control System\Live Tables\Front end\FullApp.xslt'?>
<root>
    <RefSite>Full App</RefSite>
    <FirstName>Donna</FirstName>
    <LastName>Smith</LastName>
    <Address>1234 Main Street</Address>
    <City>AnyTown</City>
    <StateProv>FL</StateProv>
    <Zip>33067</Zip>
    <Email>dsmith@meandyou.com</Email>
    <ConfirmEmail>dsmith@meandyou.com</ConfirmEmail>
    <SSN>123456789</SSN>
    <BirthDate>08/05/1951</BirthDate>
</root>

Open in new window



Renders in a browser like this
Screenprint
0
Comment
Question by:lrbrister
  • 4
  • 3
7 Comments
 
LVL 84
ID: 38865205
The browser parses the XML and presents it in a human-readable format. You'd have to do the same, in some manner.

To me the easiest way would be to build a report based on the XML data and then print that report to PDF.
0
 

Author Comment

by:lrbrister
ID: 38865427
LSMConsulting
Access 2003 Reports can render the XSLT formatting?
0
 
LVL 84

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 500 total points
ID: 38867506
No - save the data in Access, then build the report the way you want.

Access 2003 has very limited XML handling capabilities (saving XML data and persisting it out to a file, basically). If you want something more sophisticated you'd need to build your own process.

With that said: Can you not store the XML to disc, and then use an embedded web browser to show it, and then Print that document? I've never tried to print anything from a web browser through VBA but perhaps it's possible
0
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 

Author Comment

by:lrbrister
ID: 38867788
LSM Consulting
Actually, I AM storing to the users temp file at runtime and destroyong on close.

I'm using the Web Browser COntrol
You can see a similar question at This Place
0
 
LVL 84
ID: 38868470
If you're already doing that over there, then I'll post comments for the IE suggestions on that thread. If you don't get further comments here you should Delete this question.
0
 

Author Comment

by:lrbrister
ID: 38869222
LSMConsulting
I need to keep this question.

I'm looks for a way to render the xml/xslt file straight to a PDF File
0
 

Author Closing Comment

by:lrbrister
ID: 38884709
Yeah...had to go this route
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
The viewer will learn how to simulate a series of coin tosses with the rand() function and learn how to make these “tosses” depend on a predetermined probability. Flipping Coins in Excel: Enter =RAND() into cell A2: Recalculate the random variable…

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now