From: Tom van Stiphout on 20 May 2010 09:37 On Wed, 19 May 2010 17:03:18 -0700, "LA Lawyer" <hkapp(a)kapplaw.com> wrote: Unfortunately there is no way to create one "object" in Access or Word and share it in both environments. There is a way to create an "object" and share it between two Access projects (this is called an add-in or .mda), but not between Access and Word. The closest thing you can do is create one "code library" as a text file, and import it in both environments. In the VBA editor right click a code module and use the Import File and Export File options. As Jeff hinted at, you can only use features that are common to both, or your code will not compile. You could create a COM DLL in Visual Basic 6, or a .NET DLL using VSTO and Visual Studio. Both could be used from Access and Word. -Tom. Microsoft Access MVP >I am interested in two things: > >1. Making VBA-related notes to myself that is applicable both to Access and >Word. I am tried of putting identical notes in twice. > >2. I have set up a system where Word is accessing Access data for lots of >things. Thus, I can share some functions, particularly when Word uses data >from directly from Access. > >"Jeff Boyce" <nonsense(a)nonsense.com> wrote in message >news:u$FRu669KHA.4564(a)TK2MSFTNGP05.phx.gbl... >>I guess I'm still not clear on what you want to end up with. >> >> If you are already copying snippets and pasting into a Word document, what >> more are you after? >> >> Regards >> >> Jeff Boyce >> Microsoft Access MVP >> >> -- >> Disclaimer: This author may have received products and services mentioned >> in this post. Mention and/or description of a product or service herein >> does not constitute endorsement thereof. >> >> Any code or pseudocode included in this post is offered "as is", with no >> guarantee as to suitability. >> >> You can thank the FTC of the USA for making this disclaimer >> possible/necessary. >> >> "LA Lawyer" <hkapp(a)kapplaw.com> wrote in message >> news:e85AaY69KHA.4316(a)TK2MSFTNGP04.phx.gbl... >>> Actually, I am using Word and Access to do some very similar date math >>> and other functions. >>> >>> Also, I have been documenting my snippets of code and other reminders and >>> I'd not to post that this. >>> "Jeff Boyce" <nonsense(a)nonsense.com> wrote in message >>> news:%23GqzIQ69KHA.5592(a)TK2MSFTNGP02.phx.gbl... >>>> Not sure I'm following what you're after ... >>>> >>>> If you have code you've written in Access, referring to Access' features >>>> and functions, why would it work in Word, which has different features >>>> and functions? >>>> >>>> Regards >>>> >>>> Jeff Boyce >>>> Microsoft Access MVP >>>> >>>> -- >>>> Disclaimer: This author may have received products and services >>>> mentioned >>>> in this post. Mention and/or description of a product or service herein >>>> does not constitute endorsement thereof. >>>> >>>> Any code or pseudocode included in this post is offered "as is", with no >>>> guarantee as to suitability. >>>> >>>> You can thank the FTC of the USA for making this disclaimer >>>> possible/necessary. >>>> >>>> "LA Lawyer" <hkapp(a)kapplaw.com> wrote in message >>>> news:%23P429F59KHA.2248(a)TK2MSFTNGP05.phx.gbl... >>>>>I want to share code (e.g., functions and programming notes to myself) >>>>>between my Access and Word. >>>>> >>>>> How is that done? >>>>> >>>> >>>> >>> >>> >> >> >
From: Jeff Boyce on 20 May 2010 12:22 Thanks for jumping in, Tom. I knew I wasn't following ...<g>! Regards Jeff Boyce Microsoft Access MVP -- Disclaimer: This author may have received products and services mentioned in this post. Mention and/or description of a product or service herein does not constitute endorsement thereof. Any code or pseudocode included in this post is offered "as is", with no guarantee as to suitability. You can thank the FTC of the USA for making this disclaimer possible/necessary. "Tom van Stiphout" <tom7744.no.spam(a)cox.net> wrote in message news:keeav5551ff0j190ta0r29ua59sf2srskm(a)4ax.com... > On Wed, 19 May 2010 17:03:18 -0700, "LA Lawyer" <hkapp(a)kapplaw.com> > wrote: > > Unfortunately there is no way to create one "object" in Access or Word > and share it in both environments. There is a way to create an > "object" and share it between two Access projects (this is called an > add-in or .mda), but not between Access and Word. > The closest thing you can do is create one "code library" as a text > file, and import it in both environments. In the VBA editor right > click a code module and use the Import File and Export File options. > As Jeff hinted at, you can only use features that are common to both, > or your code will not compile. > You could create a COM DLL in Visual Basic 6, or a .NET DLL using VSTO > and Visual Studio. Both could be used from Access and Word. > > -Tom. > Microsoft Access MVP > > >>I am interested in two things: >> >>1. Making VBA-related notes to myself that is applicable both to Access >>and >>Word. I am tried of putting identical notes in twice. >> >>2. I have set up a system where Word is accessing Access data for lots of >>things. Thus, I can share some functions, particularly when Word uses >>data >>from directly from Access. >> >>"Jeff Boyce" <nonsense(a)nonsense.com> wrote in message >>news:u$FRu669KHA.4564(a)TK2MSFTNGP05.phx.gbl... >>>I guess I'm still not clear on what you want to end up with. >>> >>> If you are already copying snippets and pasting into a Word document, >>> what >>> more are you after? >>> >>> Regards >>> >>> Jeff Boyce >>> Microsoft Access MVP >>> >>> -- >>> Disclaimer: This author may have received products and services >>> mentioned >>> in this post. Mention and/or description of a product or service herein >>> does not constitute endorsement thereof. >>> >>> Any code or pseudocode included in this post is offered "as is", with no >>> guarantee as to suitability. >>> >>> You can thank the FTC of the USA for making this disclaimer >>> possible/necessary. >>> >>> "LA Lawyer" <hkapp(a)kapplaw.com> wrote in message >>> news:e85AaY69KHA.4316(a)TK2MSFTNGP04.phx.gbl... >>>> Actually, I am using Word and Access to do some very similar date math >>>> and other functions. >>>> >>>> Also, I have been documenting my snippets of code and other reminders >>>> and >>>> I'd not to post that this. >>>> "Jeff Boyce" <nonsense(a)nonsense.com> wrote in message >>>> news:%23GqzIQ69KHA.5592(a)TK2MSFTNGP02.phx.gbl... >>>>> Not sure I'm following what you're after ... >>>>> >>>>> If you have code you've written in Access, referring to Access' >>>>> features >>>>> and functions, why would it work in Word, which has different features >>>>> and functions? >>>>> >>>>> Regards >>>>> >>>>> Jeff Boyce >>>>> Microsoft Access MVP >>>>> >>>>> -- >>>>> Disclaimer: This author may have received products and services >>>>> mentioned >>>>> in this post. Mention and/or description of a product or service >>>>> herein >>>>> does not constitute endorsement thereof. >>>>> >>>>> Any code or pseudocode included in this post is offered "as is", with >>>>> no >>>>> guarantee as to suitability. >>>>> >>>>> You can thank the FTC of the USA for making this disclaimer >>>>> possible/necessary. >>>>> >>>>> "LA Lawyer" <hkapp(a)kapplaw.com> wrote in message >>>>> news:%23P429F59KHA.2248(a)TK2MSFTNGP05.phx.gbl... >>>>>>I want to share code (e.g., functions and programming notes to myself) >>>>>>between my Access and Word. >>>>>> >>>>>> How is that done? >>>>>> >>>>> >>>>> >>>> >>>> >>> >>> >>
First
|
Prev
|
Pages: 1 2 Prev: Win7 taskbar prograssbar from VBA Next: FRUSTRATED: Enable field depending on value of another |