473,394 Members | 1,640 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,394 software developers and data experts.

Problem with PDF995 Setup - need advice

Hi:

I have PDF995 installed (and registered) and contacted the PDF995 tech support for help in
setting up to automatically print Access reports using PDF 995. As a result I received the
following materials. I have asked them how I should set this up (being a neophyte or worse
with VBasic) and have not received any advice I can use. Right now even if I set it up as
an operation explicit, I get an error on the { characters.

Can someone please give me the basic setup I should use and I will try and take it from
there. My objective is to have a function i can call that will take parameters and change
the INI file for PDF995 and execute the PDF995 print routine.

I picked another routine up off the PDF995 web site, (which is supposed to create a
function "pdfwrite"), but that doesn't work either since it doesn't create a function that
Access can recognize. I am using Access 2000 and w98!.

Thanks a lot

John Baker

----------------------------------------------------------------------------------------------------------------------

John,

First get the pdf995.ini file using this:

void GetPdf995Path(WCHAR *szRoot, DWORD *szlen)
{
HKEY hkey1;
DWORD type1 = REG_SZ;
long rc;
WCHAR subkeyname[] = TEXT("Software\\Pdf995");
if ((RegOpenKeyEx(HKEY_LOCAL_MACHINE, &subkeyname, 0,
KEY_READ, &hkey1)) == ERROR_SUCCESS)
{
rc = RegQueryValueEx(hkey1, TEXT("Path"), NULL, &type1,
(LPBYTE)szRoot, szlen);
if (rc != ERROR_SUCCESS)
{

wcsncpy(szRoot, TEXT("c:\\"), wcslen(TEXT("c:\\"))+1);
}
RegCloseKey(hkey1);
}
else
{
wcsncpy(szRoot, TEXT("c:\\"), wcslen(TEXT("c:\\"))+1);
}

if (gl_bRunSharedNetwork)
{
WCHAR *ptr;
WCHAR szTemp[1024];
wcscpy(szTemp, gl_szSharedNetworkIni);
ptr = wcsrchr(szTemp, '\\');
ptr[0] = NULL;
ptr = wcsrchr(szTemp, '\\');
ptr[0] = NULL;
ptr = wcsrchr(szTemp, '\\');
ptr[1] = NULL;
wcscpy(szRoot, szTemp);
}



return;
}

/////////////////////////

Then do something like this:

DWORD szlen =1024;
WCHAR szIni[1024];

GetPdf995Path(szLog, &szlen);
GetPdf995Path(szIni, &szlen);
wcscat(szIni, TEXT("pdf995\\res\\pdf995.ini"));
GetPrivateProfileString(TEXT("Parameters"),TEXT("D ebug"), TEXT("0"), szBuf,
sizeof(szBuf), szIni);
if (!atoi(szBuf))
return FALSE;
Thank you,

__________________________________________________ ___________________________________________
Nov 13 '05 #1
2 4314
John Baker <Ba******@Verizon.net> wrote:
I have PDF995 installed (and registered) and contacted the PDF995 tech support for help in
setting up to automatically print Access reports using PDF 995. As a result I received the
following materials. I have asked them how I should set this up (being a neophyte or worse
with VBasic) and have not received any advice I can use. Right now even if I set it up as
an operation explicit, I get an error on the { characters.


You have C++ code there. Or similar. Throw it out.

I just added some PDF995 specific links at Creating PDF files from within Microsoft
Access http://www.granite.ab.ca/access/pdffiles.htm

Continue to ask here with any VBA type questions you may have.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Nov 13 '05 #2
Tony:

Thanks Tony, I appreciate the response.

Would you take a look at the code that is offered on your web site under the heading:

"PDF and Mail Class Library for Access "

I have downloaded that code and set it up in Access (Access 2000, W98) and for reasons I
don't understand it does NOT provide a function called "PDFWRITE". Can you see any ways
that it should be changed so that a function exists. I notice that the only reference to
pdfwrite is in the statement:

Sub pdfwrite(reportname As String, destpath As String, Optional strcriteria As String)

but I don't know enough about VBA to know if this is something that should create a
function.

Your help on this would be much appreciated.

Thanks

John Baker

Tony Toews <tt****@telusplanet.net> wrote:
John Baker <Ba******@Verizon.net> wrote:
I have PDF995 installed (and registered) and contacted the PDF995 tech support for help in
setting up to automatically print Access reports using PDF 995. As a result I received the
following materials. I have asked them how I should set this up (being a neophyte or worse
with VBasic) and have not received any advice I can use. Right now even if I set it up as
an operation explicit, I get an error on the { characters.


You have C++ code there. Or similar. Throw it out.

I just added some PDF995 specific links at Creating PDF files from within Microsoft
Access http://www.granite.ab.ca/access/pdffiles.htm

Continue to ask here with any VBA type questions you may have.

Tony


Nov 13 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: gudia | last post by:
I want to Programatically generate Access reports in the pdf format using some tool and then email them to people in the same code. Right now I am trying to do this with pdf995 using VBA (emailing...
5
by: John Baker | last post by:
Hi: I have PSD995 installed, and find it a good program. I have been told that using Access you can set up the PDF file name and location using scripting with this application so that PDF files...
16
by: cyranoVR | last post by:
This is the approach I used to automate printing of Microsoft Access reports to PDF format i.e. unattended and without annoying "Save As..." dialogs, and - more importantly - without having to use...
1
by: Luis Moura | last post by:
Hi I'm devloping an application that creates a file PDF through the software PDF995 (virtual printer). I need that the program creates the name of the file automatically and that don't appear the...
7
by: steve | last post by:
Hi All I have created rdlc files and when I load them into Report Viewer at run time they appear OK If I click on 'Print layout' button on Report Viewer the view again appears acceptable ...
5
by: dexterb | last post by:
I cannot install any pdf writers on the machine. I need to print a MS access 2000 report to a pdf file so I can email this. I already have a PDF995 printer in my windows list of printers. All this...
12
by: Tim Wallace | last post by:
I have a windows 2000 server on which I have installed the .NET 2.0 Framework runtime. I have an application I've written using VS 2005. In it, I use master pages. When I debug this app on my...
1
by: Gilberto | last post by:
pks00 Expert 280 Posts April 16th, 2007 01:08 PM Re: How to print MS Access 2000 report to PDF995 printer by VBA Code Sweet, your using pdf995, makes answering this question that much...
2
by: BobbyDazzler | last post by:
i have been writing an app for my work for 18 months now, in a fairly organic manner! my boss has never used a computerised system and i have been learning access along the way. we are a...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
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...

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.