Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
Programming
 EXP Systems Forum : PDF reDirect : Programming
Topic: ActiveX Component v2.2.6 for Programmers Post Reply Post New Topic
Author Message
Michel_K17
Moderator Group
Moderator Group
Avatar
Forum Administrator

Joined: 25 Jan 03
Posts: 1673
Quote Michel_K17 Replybullet Topic: ActiveX Component v2.2.6 for Programmers
    Posted: 21 Aug 06 at 1:39AM

Hi,

   Updated 6 Jul 08 (v2.2.6): In v2.2.6, I extensively re-wrote the VBA sample code to fix bugs and improve constructions. Note: This version is compatible with the latest v2.2.8 of PDF reDirect Pro.

    Old News:

   I have moved from a simple VB Class to a much more capable ActiveX component. Playing with the sample code will give you a good idea of the new capabilities such as FTP, e-mail, applying stamps, etc. The MS Word, Excel and Access samples were written using Office 2003, but should be compatible with Word 97, 2000 and 2002 (have not checked yet).

    Downloads:

  You need to have v2.2.6 of PDF reDirect Pro installed (available [here]). Then, you can download and install the Sample VB6/VBA and ActiveX component  [here]. The ActiveX component is registered automatically.

    The following will install and register just the ActiveX Component for those people that need to do a deployment to multiple users. Download link is [here]

   What is installed:

  The ActiveX component (ActiveX_PDF_Pro.dll) which is registered automatically and the Sample VB6, Word, Excel and Access Files. They are installed in the Program Folder as follows:

  • C:\Program Files\PDF reDirect\ActiveX_PDF_Pro.dll
  • C:\Program Files\PDF reDirect\VB6_Sample_Code\
    • Office-to-PDF Converter
      • PDF Converter.exe
      • PDF_Converter.frx
      • PDF_Converter.frm
      • PDF_Converter.vbp
      • PDF_Converter.vbw
    • Print PDF files
      • frmTestPrintPDF.frm
      • frmTestPrintPDF.frx
      • Test_Print_PDF.exe
      • Test_Print_PDF_Project.vbp
  • C:\Program Files\PDF reDirect\VBA_Sample_Code\
    • MS_Access_Sample_VBA_Code.mdb
    • MS_Excel_Sample_VBA_Code.xls
    • MS_Word_Sample_VBA_Code.doc

   Comments are welcome as usual.

Michel Korwin-Szymanowski
EXP Systems LLC
IP IP Logged
Michel_K17
Moderator Group
Moderator Group
Avatar
Forum Administrator

Joined: 25 Jan 03
Posts: 1673
Quote Michel_K17 Replybullet Posted: 21 Aug 06 at 11:08PM
Quick update: I tested today the MS Word Sample File on an older Windows 2000 machine with MS Word 2000. The code worked fine.
Michel Korwin-Szymanowski
EXP Systems LLC
IP IP Logged
cclambie
Newbie
Newbie


Joined: 12 Dec 06
Location: Australia
Posts: 4
Quote cclambie Replybullet Posted: 12 Dec 06 at 7:22PM
Hello,

I am using the Trial Version of Redirect Pro that I downloaded a couple of days ago.

System
Win XP Pro SP2
Intel P4
512Mb Ram
80Gb HDD

I am trying to using your Word sample code to use the DLL you supplied with this release.

I am testing a system to use this instead of forking out for the Distiller from Adobe that does the same thing, so appreciate your efforts in making the software.

--------------------------------------------------------------
My issue is:
I am trying to print a Word Document from within MS Access.

I have copied the “Word” sample code Module to Access and added “Dim objWord as word.application” to the object, then “objWord.” to each reference to word in the code. (code inserted below)

I am getting an error:
1.
Trial Period for PDF redirect Pro has expired.
Click OK to continue.
[OK]
 I got this error when using the system from within word, however it still created the PDF

2.
Batch_PDF_Control
An Error Occurred:
Error Number = 0
DLL Error Number = 0

No PDF is created.
Therefore the balance of my code doesn’t work which acts on the pdf being available.

Would appreciate your support.
Once I have it working I can convince the powers that be to license the software.

Thanks

Craig

IP IP Logged
cclambie
Newbie
Newbie


Joined: 12 Dec 06
Location: Australia
Posts: 4
Quote cclambie Replybullet Posted: 14 Dec 06 at 8:19PM
Hi,

I have got this to work, perfectly, thanks.  I just replaced line
Dim objWord As Word.Application
with
Dim objWord As Object
   
    Set objWord = GetObject(, "Word.Application")

and it works.

I have a further issue however.  I can't seem to debug after using the Active X control.  This issue has been addressed in the past in this MS KB Article http://support.microsoft.com/kb/q155051/ however, one would think it had been dealt with before.

I need to somehow debug the code that surrounds the PDF Conversion.

Thanks

Craig
IP IP Logged
cclambie
Newbie
Newbie


Joined: 12 Dec 06
Location: Australia
Posts: 4
Quote cclambie Replybullet Posted: 14 Dec 06 at 8:28PM
btw.
I have programitcally added the reference to your DLL and then removed the reference before I want to "debug" my code, so the "active X" control should be disabled, one would of thought.
IP IP Logged
Michel_K17
Moderator Group
Moderator Group
Avatar
Forum Administrator

Joined: 25 Jan 03
Posts: 1673
Quote Michel_K17 Replybullet Posted: 14 Dec 06 at 11:04PM
Hi Craig,

    I am glad to hear that it is (sortof) working.
 
    For the debugging portion, there may be some portion of the code which is being run in the ActiveX component, although usually it returns quite quickly, except of course for the part where it "prints" to the PDF which can take a few seconds to minutes depending how large the print is.
 
    I am a little bit confused because you were mentioning that you were trying to get it to run in Access and the code you gave was for MS Word in your e-mail, and the Microsoft technical article was for Excel 97.
 
    Could you send me the file you are trying to get to work, and I can see if I can duplicate the problem where it won't enter into break mode. Have you tried setting a break point in the code to force it to stop?
Michel Korwin-Szymanowski
EXP Systems LLC
IP IP Logged
RobZ
Newbie
Newbie


Joined: 09 Jan 07
Location: South Africa
Posts: 2
Quote RobZ Replybullet Posted: 09 Jan 07 at 9:20AM
Hi There,
I am receiving an trail period expired alert while trying out the ActiveX.
Can the ActiveX component work during the 90 day trial?
I am trying to test to see if your product will work for a solution that i am currently busy with. (or more correcly if i am clever enough to use your product Embarrassed)
 
OK Update : I Decided to Purchase the Pro Version anyway, hoping that was the error, I no longer get the trial has expired message, but still receive alert that PDF reDirect Pro is not activated!
 
Error = 0
Dll Error = 1906
 
after tracing example code error occurs on following line :
'----------------------
' Save the new Settings
'----------------------
TempBool = oPDF.Batch_Printer_Save_Settings(MyBatchPrinter)
 
 
Please Help !!!!
 
IP IP Logged
Michel_K17
Moderator Group
Moderator Group
Avatar
Forum Administrator

Joined: 25 Jan 03
Posts: 1673
Quote Michel_K17 Replybullet Posted: 09 Jan 07 at 10:54PM
Hi Rob,

    Sorry to hear of the problem. I'll refund your money if I can't solve the problem for you. I'll take a look right away.

    Cheers!

Michel Korwin-Szymanowski
EXP Systems LLC
IP IP Logged
Michel_K17
Moderator Group
Moderator Group
Avatar
Forum Administrator

Joined: 25 Jan 03
Posts: 1673
Quote Michel_K17 Replybullet Posted: 10 Jan 07 at 1:38AM
Hi,

    OK: I made some headway. Looks like the ActiveX component is not compatible with the latest core code from the v2.1.908 beta download (I am assuming that is what you are using)

    I have written a fix, and it seems to work OK on my system. I need another day to test all of the code changes, and to build the installation script. Please give me another day, and it should be available for download then.

    Thank you for your patience!

    Regards,

Michel Korwin-Szymanowski
EXP Systems LLC
IP IP Logged
RobZ
Newbie
Newbie


Joined: 09 Jan 07
Location: South Africa
Posts: 2
Quote RobZ Replybullet Posted: 10 Jan 07 at 1:42AM

Thanks Michel, Great news! 

appreciate your very quick response! -

 

 

IP IP Logged
Michel_K17
Moderator Group
Moderator Group
Avatar
Forum Administrator

Joined: 25 Jan 03
Posts: 1673
Quote Michel_K17 Replybullet Posted: 11 Jan 07 at 12:42AM
Hi,

    OK, I have updated the ActiveX component which is available [here] to be compatible with PDF reDirect Pro Beta v2.1.908, and it's working fine again.

    Let me know how you make out.

    Cheers!



Michel Korwin-Szymanowski
EXP Systems LLC
IP IP Logged
HWMichaelKahle
Newbie
Newbie


Joined: 16 Feb 07
Posts: 2
Quote HWMichaelKahle Replybullet Posted: 16 Feb 07 at 4:40AM
Hello Michel_K17,

I looked ariund long to find something where i can make a VBA convert to PDF from any Office Program and was pleased when i found your program.

However i tried to use your sample code and it wouldn't work.

First i used the VB6 Class you provided. It didn't work.

I got a eroornumber 100 critical and saw, there was no VBA Printer installed. You stated that the class is obsolete so i tried out your activeX Library with the sample code.

It won't work either. On your Word Sample it says thet it couldn't find the PDF_reDirect_Pro_Tool Class.

Dim oPDF As New PDF_reDirect_Pro_Tool


Do i need to Register my Pro version to test it out first?

Can you help me with this One.

Oh, and the BatchVBA Printer you use seems not to be installed either.

Thanks in advance
    Michael Kahle


edit: My reDirect Pro Version is 2.1.12
IP IP Logged
HWMichaelKahle
Newbie
Newbie


Joined: 16 Feb 07
Posts: 2
Quote HWMichaelKahle Replybullet Posted: 16 Feb 07 at 5:02AM
Hi, the problem was my fault.

I didn't check if the dll was properly Referenced. There was an error with the installation Path of the DLL which wasn't installe in "c:\program files" but in the german "c:\Programme".

Works fine now for me. thanks for this great program.
IP IP Logged
Michel_K17
Moderator Group
Moderator Group
Avatar
Forum Administrator

Joined: 25 Jan 03
Posts: 1673
Quote Michel_K17 Replybullet Posted: 17 Feb 07 at 10:32AM
Hi Michael,

    No worries. Smile.

    You are right: I did not place any effort in localizing the VBA code to account for different languages. Sorry.

Michel Korwin-Szymanowski
EXP Systems LLC
IP IP Logged
Stephen Fuld
Newbie
Newbie


Joined: 13 Mar 07
Location: United States
Posts: 8
Quote Stephen Fuld Replybullet Posted: 15 Mar 07 at 5:36PM
As you suggested to me in the programming forum, I am trying the latest beta version of the active X control.  I installed PDFreDirect pro, then the lastest VBA samples and active X control. 

When I loaded the Word sample code into Word 97 and clicked on the button, I got an error on the statement

Dim oPDF As New PDF_reDirect_Pro_Tool

saying that it could not find the component.
IP IP Logged
Michel_K17
Moderator Group
Moderator Group
Avatar
Forum Administrator

Joined: 25 Jan 03
Posts: 1673
Quote Michel_K17 Replybullet Posted: 15 Mar 07 at 8:33PM
Hi,

    There are a couple of things you can try.

    First, try rebooting - that might get Windows to "pickup" (reference) the new component.

    If that does not work, go into the VBA editor, and select "Tools" menu, then "References" and browse for the ActiveX component that you installed. Once the reference is established, the code should run just fine.

    Cheers!

Michel Korwin-Szymanowski
EXP Systems LLC
IP IP Logged
Stephen Fuld
Newbie
Newbie


Joined: 13 Mar 07
Location: United States
Posts: 8
Quote Stephen Fuld Replybullet Posted: 15 Mar 07 at 11:06PM
Rebooting did not help, so I tried the editor reference browse.  I clicked on the Active X DLL in the c:\program files\PDF_reDirect\directory then clicked "open" in the dialog box then saved  saved the macro.  That also did not work.  I do get the line "MISSING: PDF redirect Pro Remote Control" checked in the list of places to look.
IP IP Logged
Michel_K17
Moderator Group
Moderator Group
Avatar
Forum Administrator

Joined: 25 Jan 03
Posts: 1673
Quote Michel_K17 Replybullet Posted: 18 Mar 07 at 10:10AM
Hi Stephen,

    OK, I see. It looks like my Word document is looking for the component in a specific location which is different on your computer.

    To fix:
  1. go back in the Tools >> References menu
  2. Deselect the item that says "MISSING: PDF redirect Pro Remote Control"
  3. Scroll down the list and select the item that says "PDF redirect Pro Remote Control". They are listed alphabetically, so scroll down the list a fair bit.
    I believe that should get you going. I will try to fix this problem permanently in the next release of the component.

Michel Korwin-Szymanowski
EXP Systems LLC
IP IP Logged
Stephen Fuld
Newbie
Newbie


Joined: 13 Mar 07
Location: United States
Posts: 8
Quote Stephen Fuld Replybullet Posted: 18 Mar 07 at 1:53PM
Did you really mean to have the same words "PDF redirect Pro Remote Control" in the both item to deselect (the one with "MISSING"" and in the item to select, or is this just a typo?  In any event, I don't have an entry for those words without the "MISSING" in it.

BTW, I appreciate both your responsiveness and your efforts in my behalf.  Thanks
IP IP Logged
Stephen Fuld
Newbie
Newbie


Joined: 13 Mar 07
Location: United States
Posts: 8
Quote Stephen Fuld Replybullet Posted: 18 Mar 07 at 6:51PM
Progress!!! Smile

I unchecked the "missing" entry then closed the list.  When I opened it again, the correct entry appeared!  I selected it and saved the macro.  This allowed me to get further.  I now get an error that Replace$ is not defined.
IP IP Logged
Michel_K17
Moderator Group
Moderator Group
Avatar
Forum Administrator

Joined: 25 Jan 03
Posts: 1673
Quote Michel_K17 Replybullet Posted: 20 Mar 07 at 7:54PM
Hi,

    I am glad to hear of the (small) progress. Smile

    The "Replace$" function is native to VBA, but it might be that Word 97 does not that function. I have tested Word 2000, 2003 and 2007.

    Check the help file that comes with Word (via the VBA IDE) and search for the replace function. If it is not there, then it is something that came out with Word 2000. If so, we can google the web for code that does the same thing (or I can write a routine for you).



Michel Korwin-Szymanowski
EXP Systems LLC
IP IP Logged
Stephen Fuld
Newbie
Newbie


Joined: 13 Mar 07
Location: United States
Posts: 8
Quote Stephen Fuld Replybullet Posted: 21 Mar 07 at 12:45PM
Apparently Replace$ isn't in Word 97.  I recoded the line to

MyOutputFilename = Right(ActiveDocument.Name, Len(ActiveDocument.Name) - 4) & ".pdf"

And it worked!  I thought I saw that you supported Word 97.  I chose to use it both because I had it installed and I figured "lowest common denominator".  If you don't support it, I can move to a later version, or feel free to use the code above to fix the problem.

I did get the "error" message that the trial period had expired, but when I answered continue, it went to completion and produced the PDF.

I will now proceed to merge your code with my existing code to get the application working. 

Thanks again for all of your help!
IP IP Logged
Michel_K17
Moderator Group
Moderator Group
Avatar
Forum Administrator

Joined: 25 Jan 03
Posts: 1673
Quote Michel_K17 Replybullet Posted: 21 Mar 07 at 11:53PM
I think that if I have a claim of Word 97 compatibility, it is left over from a couple years ago, but I have moved on, so I will fix that in the docs.

The "error" message is FYI. I probably apply (going by memory here) a "demo" stamp to your PDF. I know I do in the actual application, but I can't remember if that was incorporated in the Batch Printer code.

Glad you got it working though! Smile

You are welcome.

Michel Korwin-Szymanowski
EXP Systems LLC
IP IP Logged
eduardocosta
Newbie
Newbie
Avatar

Joined: 04 Jul 07
Location: Brazil
Posts: 1
Quote eduardocosta Replybullet Posted: 04 Jul 07 at 10:30PM
Message: "Trial Period has expired."
And after: Err = 0 Dll err Number = 1906
 
I just have installed PDF Pro today.
 
Can you help me?
IP IP Logged
Michel_K17
Moderator Group
Moderator Group
Avatar
Forum Administrator

Joined: 25 Jan 03
Posts: 1673
Quote Michel_K17 Replybullet Posted: 06 Jul 07 at 11:03PM
Hi,

    I think I know what is going on.

    I am guessing that you are currently running the main program in "Freeware" mode. Please make sure that you are in "Pro" mode either via the "preferences" or by using the Promo button in the Freeware titlebar.

    Alternatively, find the Prefs.ini file in C:\Documents and Settings\[Username]\Application Data\PDF reDirect and change the Pro_mode setting from "0" to "-1". I should look like this:

-->Pro_Mode=-1

I hope that helps.



Michel Korwin-Szymanowski
EXP Systems LLC
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum