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

VBA code for changing papersize from A4 to B4

P: 1
hai,
I am a new user of this site,
Hope u people guide me in successful way,

my problem is i am completely new to VBA,
recently i did a project in that we had a report, initial papersize is A4,
i suppose to change it to B4, i did it successfully at my desktop, for that used page settings, but when it is delivered reports are coming in A4,
i tried a lot at google, i came to know that we can do this by using prtDevMode,for that we need these three modules(basDevMode,basPrtDest,basStrings)
from CH10.MDB Dll in our application,
i dont know how to add modules n Dlls,
pls find some solution for my problem,

Thank you very much,
Regards,
MD shafi.
Sep 7 '07 #1
Share this Question
Share on Google+
4 Replies


Jim Doherty
Expert 100+
P: 897
hai,
I am a new user of this site,
Hope u people guide me in successful way,

my problem is i am completely new to VBA,
recently i did a project in that we had a report, initial papersize is A4,
i suppose to change it to B4, i did it successfully at my desktop, for that used page settings, but when it is delivered reports are coming in A4,
i tried a lot at google, i came to know that we can do this by using prtDevMode,for that we need these three modules(basDevMode,basPrtDest,basStrings)
from CH10.MDB Dll in our application,
i dont know how to add modules n Dlls,
pls find some solution for my problem,

Thank you very much,
Regards,
MD shafi.
OK..am subscribing to this thread This can be done but have to dash out now I'll return shortly and take you through it step by step very slowly given you say you are new to VBA unless of course you are answered in the meantime

Jim
Sep 8 '07 #2

ADezii
Expert 5K+
P: 8,669
hai,
I am a new user of this site,
Hope u people guide me in successful way,

my problem is i am completely new to VBA,
recently i did a project in that we had a report, initial papersize is A4,
i suppose to change it to B4, i did it successfully at my desktop, for that used page settings, but when it is delivered reports are coming in A4,
i tried a lot at google, i came to know that we can do this by using prtDevMode,for that we need these three modules(basDevMode,basPrtDest,basStrings)
from CH10.MDB Dll in our application,
i dont know how to add modules n Dlls,
pls find some solution for my problem,

Thank you very much,
Regards,
MD shafi.
Being completely new to VBA, I just wanted to let you know that you are tackling a very complex PrtDevMode Property. It is a challenging task even for someone with programming experience. You can try modifying the PaperSize Property for the Printer bound to your Report directly, namely:
Expand|Select|Wrap|Line Numbers
  1. Reports!<your Report Name>.Printer.PaperSize = <Constant Value>
Expand|Select|Wrap|Line Numbers
  1. 'Possible Constant Values
  2. acPRPS10x14 
  3. acPRPS11x17 
  4. acPRPSA3 
  5. acPRPSA4 
  6. acPRPSA4Small 
  7. acPRPSA5 
  8. acPRPSB4 
  9. acPRPSB5 
  10. acPRPSCSheet 
  11. acPRPSDSheet 
  12. acPRPSEnv10 
  13. acPRPSEnv11 
  14. acPRPSEnv12 
  15. acPRPSEnv14 
  16. acPRPSEnv9 
  17. acPRPSEnvB4 
  18. acPRPSEnvB5 
  19. acPRPSEnvB6 
  20. acPRPSEnvC3 
  21. acPRPSEnvC4 
  22. acPRPSEnvC5 
  23. acPRPSEnvC6 
  24. acPRPSEnvC65 
  25. acPRPSEnvDL 
  26. acPRPSEnvItaly 
  27. acPRPSEnvMonarch 
  28. acPRPSEnvPersonal 
  29. acPRPSESheet 
  30. acPRPSExecutive 
  31. acPRPSFanfoldLglGerman 
  32. acPRPSFanfoldStdGerman 
  33. acPRPSFanfoldUS 
  34. acPRPSFolio 
  35. acPRPSLedger 
  36. acPRPSLegal 
  37. acPRPSLetter 
  38. acPRPSLetterSmall 
  39. acPRPSNote 
  40. acPRPSQuarto 
  41. acPRPSStatement 
  42. acPRPSTabloid 
  43. acPRPSUser 
Sep 8 '07 #3

Jim Doherty
Expert 100+
P: 897
OK..am subscribing to this thread This can be done but have to dash out now I'll return shortly and take you through it step by step very slowly given you say you are new to VBA unless of course you are answered in the meantime

Jim
ok back with you..I see you have had an answer great. If you use Access 2003 go with that answer.

But which version are you using? Because you referred to CH10.MDB and basDevMode,basPrtDest,basStrings I suspect you are earlier than 2003?

Jim
Sep 8 '07 #4

Jim Doherty
Expert 100+
P: 897
ok back with you..I see you have had an answer great. If you use Access 2003 go with that answer.

But which version are you using? Because you referred to CH10.MDB and basDevMode,basPrtDest,basStrings I suspect you are earlier than 2003?

Jim
As a PS I am on vacation as of today (off to sunny cyprus) so if you don't get a resolution you can PM me and I'll continue on return next week?

Jim
Sep 11 '07 #5

Post your reply

Sign in to post your reply or Sign up for a free account.