Adam
Oh, you're gonna love Stephen's solution. The man is the king of API and DLL for
VBA.
Regards,
Bill
From: MS_Access_Professionals@yahoogroups.com
[mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of AdamF
Sent: Thursday, July 26, 2012 3:32 PM
To: MS_Access_Professionals@yahoogroups.com
Subject: [MS_AccessPros] Re: Access/VB in XP & Win7 environments
It's 2000 (in the process of upgrading to 2010), but I think Lebans should work.
I'll write back if I can't figure it out.
Thanks
--- In MS_Access_Professionals@yahoogroups.com
<mailto:MS_Access_Professionals%40yahoogroups.com> , "Bill Mosca" <wrmosca@...>
wrote:
>
> Adam
>
>
>
> Let's start with what late-binding is. When you use late-binding you do not
have
> to add the library to your references. You create the object dynamically with
> CreateObject which will automatically load the user's current DLL. It doesn't
> matter which version he has.
>
>
>
> Early-binding is the opposite. When you load the Outlook DLL through
> Tools>References you can only load the one that you have on your computer.
That
> might not be what other users have.
>
>
>
> If you are using SendObject there is no need to add an Outlook reference. That
> command will use whatever email software you have.
>
>
>
> If you want to save the report before sending it you will have to save it as a
> PDF. Just about any other file type will lose formatting and graphics. Then
you
> will have to add code to open a dialog box so the user can select the files he
> wants sent. There is a module called basCommDlg.bas in our Files>Modules
folder.
> You can download it, unzip it and then import it into your code.
>
>
>
> As to sending to a PDF writer, that depends on what version of Access you are
> using. If it's 2003, go to Lebans.com and download his sample db for
converting
> reports to PDF. I've been using it for years and it works with all versions of
> Windows (so far). If you are using 2007 there is an add-in you can download
for
> Microsoft. If you have 2010 PDF capability is built in...finally!
>
>
>
> None of the above require adding a reference.
>
>
>
>
>
> Regards,
>
> Bill
>
>
>
> From: MS_Access_Professionals@yahoogroups.com
<mailto:MS_Access_Professionals%40yahoogroups.com>
> [mailto:MS_Access_Professionals@yahoogroups.com
<mailto:MS_Access_Professionals%40yahoogroups.com> ] On Behalf Of AdamF
> Sent: Thursday, July 26, 2012 1:30 PM
> To: MS_Access_Professionals@yahoogroups.com
<mailto:MS_Access_Professionals%40yahoogroups.com>
> Subject: [MS_AccessPros] Re: Access/VB in XP & Win7 environments
>
>
>
>
>
> Bill,
>
> Thanks for the code. I do have some questions.
>
> The code appears to work for attaching an externally saved file. However, with
> the SendObject command, I'm attaching an open report that is not being saved
> externally. How would I do that with late binding?
>
> If I do have to first save a report externally, is there a way to select the
> file(s) rather than listing them in the Call statement?
>
> What does "late binding" mean?
>
> How would I do something similar (late biding, I assume) with different
versions
> of a pdf writer?
>
> Thanks
> Adam
>
> --- In MS_Access_Professionals@yahoogroups.com
<mailto:MS_Access_Professionals%40yahoogroups.com>
> <mailto:MS_Access_Professionals%40yahoogroups.com> , "Bill Mosca" <wrmosca@>
> wrote:
> >
> > Adam
> >
> > Any time you add an Office product library to your project references you're
> risking what you have now. Change everything to late binding.
> >
> > I show an example on my Code samples page of my site thatlldoit.com
> >
> > If you need more help let us know.
> >
> > Regards,
> > Bill Mosca, Founder - MS_Access_Professionals
> > http://www.thatlldoit.com
> > Microsoft Office Access MVP
> >
https://mvp.support.microsoft.com/profile=C4D9F5E7-BB03-4291-B816-64270730881E
> > My nothing-to-do-with-Access blog
> > http://wrmosca.wordpress.com
> >
> >
> >
> > --- In MS_Access_Professionals@yahoogroups.com
<mailto:MS_Access_Professionals%40yahoogroups.com>
> <mailto:MS_Access_Professionals%40yahoogroups.com> , "AdamF"
<runuphillracing@>
> wrote:
> > >
> > > We're transitioning from XP to Win7, and Access2000 (yup) to 2010. For now
> we're still using 2000, however in both XP & Win7 environments. VB doesn't
> compile the same in XP & Win 7. I think this mainly has to do with reference
> libraries. For example, in XP, it requires the MS Office Excel and Outlook
11.0
> Object Libraries, while in Win7 it needs 14.0.
> > >
> > > Is there a way around this or is it something we just have to put up with
> until we're all on Win7? The biggest problem seems to be with Outlook, with
the
> SendObject command.
> > >
> > > Thanks
> > > Adam
> > >
> >
>
>
>
>
>
> [Non-text portions of this message have been removed]
>
[Non-text portions of this message have been removed]
Kamis, 26 Juli 2012
RE: [MS_AccessPros] Re: Access/VB in XP & Win7 environments
__._,_.___
.
__,_._,___
Langganan:
Posting Komentar (Atom)
Tidak ada komentar:
Posting Komentar