From: Chirag on 3 Apr 2010 06:07 "LA Lawyer" <hkapp(a)kapplaw.com> wrote in message news:Ohz51Es0KHA.3412(a)TK2MSFTNGP05.phx.gbl... > "Karl E. Peterson" <karl(a)exmvps.org> wrote in message > news:%23nBWvAs0KHA.6104(a)TK2MSFTNGP06.phx.gbl... >> LA Lawyer wrote: >>> I want to assign some variables in Access, then open Word and have those >>> variables available to me the entire time that I am in that session of >>> Word, even if open another document. >> >> Are you attempting to automate Word from Access? Or are you just >> starting Word up, and wanting it to bootstrap these values somehow? > > The latter: I am starting Word through Access VBA and then I want to use > those values in Word throughout the session, even if I left the > ActiveDocument. After starting Word, your code in Word can perhaps automate your already open instance of Access and ask it for the data you want through the Application.Run() method of Access. - Chirag PowerShow - View multiple PowerPoint slide shows simultaneously http://officeone.mvps.org/powershow/powershow.html
From: Fumei2 via OfficeKB.com on 6 Apr 2010 16:13 1. setting them as DOCVARIABLES will work for each document, but not for ANY document. 2. if you want the variables toi be accessible to Word, while you are action Word FROM Access, then you can simply use them as Public variables in Access. However, if I understand correctly, you want to set a variable value, from Access, and then be able to open Word and have those variables accessible... even if you close Access. Correct? In other words, you are using Access to see a value to a variable, but you are NOT dependent on Access for getting those values (after they are set). In which case, I am with the idea of setting the values in an INI file. Word can read the INI file. They can be used by any document, not just activedocument. Chirag wrote: >>>> I want to assign some variables in Access, then open Word and have those >>>> variables available to me the entire time that I am in that session of >[quoted text clipped - 6 lines] >> those values in Word throughout the session, even if I left the >> ActiveDocument. > >After starting Word, your code in Word can perhaps automate your already >open instance of Access and ask it for the data you want through the >Application.Run() method of Access. > >- Chirag > > PowerShow - View multiple PowerPoint slide shows simultaneously > http://officeone.mvps.org/powershow/powershow.html -- Gerry Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.aspx/word-programming/201004/1
First
|
Prev
|
Pages: 1 2 3 Prev: How to get the text of each selection? Next: Unique ID to WORD2007 sections |