Duncan,
I didn't realize I had to remove "Application.CurrentProject.Path " for it
to work.
Thanks,
Matt
"Duncan Bachen" wrote:
> Matt wrote:
> > I just split a DB so that users can have the frontend on their desktop. The
> > DB used to run on the server and Mail Merge documents were located on the
> > server as well.
> > I am keeping everything set up the same as before, (where everything worked
> > fine) except that the front end is now on the desktops.
> >
> > I'm running the following code to open a Mail Merge Word document on the
> > server:
> >
> > Private Sub lblBB_Click()
> > Dim BBA As String
> > Dim objWord As Word.Application
> >
> > Set objWord = CreateObject("Word.Application")
> >
> > BBA = Application.CurrentProject.Path & "\Documents\Board Briefing\Board
> > Briefing Agenda.doc"
> >
> > With objWord
> > .Visible = True
> > .Documents.Open (BBA)
> > .Activate
> > End With
> > End Sub
> >
> > This worked fine when everything was on the server. Now when on the desktop
> > I have changed the path to both "\\ServerName\\Path\Board Briefing Agenda.doc"
> > and "L:\Path\Board Briefing Agenda.doc" (L: being the network drive letter
> > where everything is stored). With both of these methods, the DB is looking
> > in "C:\Documents and Settings\...\Desktop\(path in code)" Its looking on my
> > desktop.
> >
> > How do I tell the DB to change network drives and not look on the C: drive?
> >
> > Thanks a lot!
> > -Matt
>
> You're changing the entire line, including removal of the part that
> references the Application Current Path right?
> BBA = "\\ServerName\\Path\Board Briefing Agenda.doc"
> or
> BBA = "L:\Path\Board Briefing Agenda.doc"
>
>
> --
> -D
> Duncan Bachen
> Director of I.T., Ole Hansen and Sons, Inc.
>
|