[AccessD] Relative reference to Word document?

Tina Norris Fields tinanfields at torchlake.com
Fri Aug 23 08:26:18 CDT 2013


Another good idea, elegant and sophisticated.  Thanks.
TNF

Tina Norris Fields
tinanfields-at-torchlake-dot-com
231-322-2787

On 8/23/2013 9:12 AM, Guss Ginsburg wrote:
> You could also have a configuration table that identifies the names and
> locations of your templates.  If someone reconfigures your network or does
> something else to disturb the expected location, you could update the config
> table to show the new path and filename.  Then have your code look up the
> info from the table, and plug the info into a variable in your Call
> statement.
>
> Sincerely yours,
>   
> Guss Ginsburg
> Beechnut Consulting Services
>
> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com
> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Tina Norris
> Fields
> Sent: Friday, August 23, 2013 8:00 AM
> To: Access Developers discussion and problem solving
> Subject: Re: [AccessD] Relative reference to Word document?
>
> Aha!
> Thanks
>
> Tina Norris Fields
> tinanfields-at-torchlake-dot-com
> 231-322-2787
>
> On 8/22/2013 2:47 PM, Arthur Fuller wrote:
>> Tina,
>>
>> Use the CurDir() function to obtain the name of the current directory.
>>
>> Arthur
>>
>>
>> On Thu, Aug 22, 2013 at 10:25 AM, Tina Norris Fields <
>> tinanfields at torchlake.com> wrote:
>>
>>> Hi,
>>>
>>> I have a little membership and donors database for my local Habitat
>>> office.  There is an acknowledgement letter that goes out to donors
>>> on a periodic basis, thanking them for their donation and recognizing
>>> any particular designation - so, it's a form letter whose data source
>>> is a table created by a query that pulls the data for a given deposit
> date.
>>> In the database, I have a little form with instructions to the user
>>> to set the date, click the button to make the list of donors, click
>>> the button to launch Word and open the acknowledgement form letter,
>>> and after the merge is completed and the user returns to the Access
>>> form, another button to close the form.
>>>
>>> ==============================**==============================**
>>> =============
>>> The event procedure to get the form letter looks like this:
>>>
>>> Private Sub btnContribAcknowledgeLtr_**Click()
>>> On Error GoTo Err_btnContribAcknowledgeLtr_**Click
>>>
>>>       Call RunApp("V:\Admin
>>> Asst\Access\HFHV11_Files\**TinaDonationTestLtr2.doc",
>>> 1)
>>>
>>> Exit_btnContribAcknowledgeLtr_**Click:
>>>       Exit Sub
>>>
>>> Err_btnContribAcknowledgeLtr_**Click:
>>>       MsgBox Err.Description
>>>       Resume Exit_btnContribAcknowledgeLtr_**Click
>>>
>>> End Sub
>>> ==============================**==============================**
>>> =============
>>>
>>> As you see, the RunApp call uses an absolute reference to the
>>> location of the form letter.
>>>
>>> Every so often, somebody moves the database directory to a different
>>> folder and the path gets lost.  What I want to do is place the form
>>> letter in the same folder as the database and use a relative
>>> reference, but, so far I have been unable to do that.  It seems so
>>> simple, but I'm not succeeding.
>>>
>>> Oh, yeah - history.  This database was first developed in Access 97,
>>> then converted for A2003, then A2007, and now the office is updating to
> A2013.
>>>    I've already discovered that all my nice calendar controls got
>>> broken and I'm reconfiguring my forms to use the textbox date picker.
>>> But, I just know there must be references and other goodies that are
>>> also broken.  I'll appreciate any help you guys are able and willing to
> provide.
>>> Ideas?
>>>
>>> TNF
>>>
>>> --
>>> Tina Norris Fields
>>> tinanfields-at-torchlake-dot-**com
>>> 231-322-2787
>>>
>>> --
>>> AccessD mailing list
>>> AccessD at databaseadvisors.com
>>> http://databaseadvisors.com/**mailman/listinfo/accessd<http://databas
>>> eadvisors.com/mailman/listinfo/accessd>
>>> Website:
>>> http://www.databaseadvisors.**com<http://www.databaseadvisors.com>
>>>
>>
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>
>



More information about the AccessD mailing list