Re: Create PDF from VB without using a Printer

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance




"Ron Weiner" <rweineratworksritedotcom> wrote in message
news:OwU6T2LtHHA.4796@xxxxxxxxxxxxxxxxxxxxxxx
It is pretty impressive. I'm not so sure that formatted reports would be all
that bad, as long as they were fairly reasonable on formatting, and limited
on graphics. I could see doing some data reporting with it.

I agree creating formatted reports on the fly would not be a problem. However
if you wanted to open a file and keep all of the formatting found there
(fonts, bullets, tables, etc.) the translation would be a bear. Using a
similar commerical product I was able to create very complex data driven
reports (actually K-6 report cards) in a heartbeat.


Right. Adding your own formatting would be okay; trying to convert existing RTF
style formatting would be a nightmare. I have used commercial products all
along, including ActiveReports, which has a PDF export, so I'm just doodling
here...

I am curious about one line in the demo app, which is a method of invoking a
file viewer, in this case obviously the registered PDF file viewer. I haven't
seen this style before:

Call Shell("rundll32.exe url.dll,FileProtocolHandler " & (strFile),
vbMaximizedFocus)

Is this a handy way to open files, and is it better in some way than other
methods?

I also was surprised to find this, and never have seen anything like this code
before. I have always used the API ShellExecuteA function to start the
registered application for a file. Might have to do some Goggling...



I did a little Googling. Apparently sometimes you can get snagged by
ShellExecute in multi-threaded situations, since the ability to launch an app by
file type was sort of tacked on using COM, and that may not get initialized
correctly in a separate thread - or something like that.

The rundll32.exe call, on the other hand, is a true .exe call to Shell (or
ShellExecute), passing some command line parameters. rundll32 in turn will run
the url.dll and call its FileProtocolHandler function, passing the rest of the
command line. The call itself won't fail; although it also won't return any
error back to the caller if it can't open the url.


.



Relevant Pages

  • Re: Create PDF from VB without using a Printer
    ... I could see doing some data reporting with it. ... I agree creating formatted reports on the fly would not be a problem. ... However if you wanted to open a file and keep all of the formatting found ... in this case obviously the registered PDF file viewer. ...
    (microsoft.public.vb.general.discussion)
  • Re: Use variable with small Roman numerals?
    ... subparagraph styles with automatic indents and numbering. ... Or at least, not in _my_ reports. ... Doug Robbins - Word MVP ... The closest I came up with was formatting a Word field ...
    (microsoft.public.word.vba.general)
  • Re: Using POI to create XLS from a C app
    ... from data in a special 'flagged CSV' file format. ... Now a big client wants the data in excel files with all the formatting ... his reports in Excel instead of as PDF's. ... I considered somehow launching an external java app that would somehow ...
    (comp.lang.java.programmer)
  • Re: Report Template and Access (Big Task)
    ... formal reports and also capture specific elements of the reports for use ... really doesn't' work with the formatting I'm trying to maintain. ... Form fields seem to be the best way to go, ... The protection of the document is vital because of the ...
    (microsoft.public.word.vba.general)
  • Re: Access reports or Word Document
    ... "Larry Linson" wrote: ... > reports directly from Access. ... were producing brochures (intended to impress with fancy formatting) then ... > capability to reasonably reproduce the ...
    (microsoft.public.access.gettingstarted)