By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,466 Members | 1,756 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,466 IT Pros & Developers. It's quick & easy.

Problem with PDF995 Setup - need advice

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.