-
How to open a Word doc.
Can anyone tell me how to open a Word document, sitting in a public
folder, on an Exchange server, from a VB6 app?
My VB app is an index of documents, for example:
//Public Folders/Our Enterprise/MyDocument.doc
and I want our users to be able to click on a control and have the
document open.
Any hints would be appreciated!
-
Re: How to open a Word doc.
Jacques
I assume that you want the document to open in a standard word environment...
Set w = New Word.Application
Dim w As Word.Application
w.Documents.Open "c:\test.doc"
w.Visible = True
there you go..
Ian Drake
Jacques Labbe <jacques.labbe@jus.gov.on.ca> wrote:
>Can anyone tell me how to open a Word document, sitting in a public
>folder, on an Exchange server, from a VB6 app?
>
>My VB app is an index of documents, for example:
>
>//Public Folders/Our Enterprise/MyDocument.doc
>
>and I want our users to be able to click on a control and have the
>document open.
>
>Any hints would be appreciated!
>
-
Re: How to open a Word doc.
Thanks Ian,
.... but my problem is with the actual path to the document. The documents reside
in the Public Folders area on an Exchange server. We normally get to them
through Outlook. I can open it using ShellExecute
"outlook://PublicFolders/etc/~document.doc"
but that opens Outlook then Word, then brings up a Closing Outlook dialog etc.
Messy, messy, messy!
Using your technique and inserting my path yields error 5273 - "Document name or
path is not valid." I've tried the path every which way I can think of and still
the same result."
Thanks
jacques
Ian Drake wrote:
> Jacques
>
> I assume that you want the document to open in a standard word environment...
>
> Set w = New Word.Application
> Dim w As Word.Application
> w.Documents.Open "c:\test.doc"
> w.Visible = True
>
> there you go..
> Ian Drake
>
> Jacques Labbe <jacques.labbe@jus.gov.on.ca> wrote:
> >Can anyone tell me how to open a Word document, sitting in a public
> >folder, on an Exchange server, from a VB6 app?
> >
> >My VB app is an index of documents, for example:
> >
> >//Public Folders/Our Enterprise/MyDocument.doc
> >
> >and I want our users to be able to click on a control and have the
> >document open.
> >
> >Any hints would be appreciated!
> >
-
Re: How to open a Word doc.
I think you need to map a logical drive to the network path. Right click My
Computer, Map Network Drive, select a drive letter, then enter your path,
//Public Folders/Our Enterprise
Then you should be able to
w.Documents.Open "e:\test.doc"
or whatever drive you mapped.
Good luck.
"Jacques Labbe" <jacques.labbe@jus.gov.on.ca> wrote in message
news:39C28C0F.296C8EFD@jus.gov.on.ca...
> Thanks Ian,
>
> ... but my problem is with the actual path to the document. The documents
reside
> in the Public Folders area on an Exchange server. We normally get to them
> through Outlook. I can open it using ShellExecute
> "outlook://PublicFolders/etc/~document.doc"
> but that opens Outlook then Word, then brings up a Closing Outlook dialog
etc.
> Messy, messy, messy!
>
> Using your technique and inserting my path yields error 5273 - "Document
name or
> path is not valid." I've tried the path every which way I can think of
and still
> the same result."
>
> Thanks
> jacques
>
> Ian Drake wrote:
>
> > Jacques
> >
> > I assume that you want the document to open in a standard word
environment...
> >
> > Set w = New Word.Application
> > Dim w As Word.Application
> > w.Documents.Open "c:\test.doc"
> > w.Visible = True
> >
> > there you go..
> > Ian Drake
> >
> > Jacques Labbe <jacques.labbe@jus.gov.on.ca> wrote:
> > >Can anyone tell me how to open a Word document, sitting in a public
> > >folder, on an Exchange server, from a VB6 app?
> > >
> > >My VB app is an index of documents, for example:
> > >
> > >//Public Folders/Our Enterprise/MyDocument.doc
> > >
> > >and I want our users to be able to click on a control and have the
> > >document open.
> > >
> > >Any hints would be appreciated!
> > >
>
-
Re: How to open a Word doc.
Thanks Norm,
If it were just for my use, that solution would work fine. However, this app
has to go out to over 600 users. I've relied on mapped drives before in much
smaller environments and the support is a nightmare with users losing their
mapping.
I'm going to have to keep looking.
Jacques
Norm Cook wrote:
> I think you need to map a logical drive to the network path. Right click My
> Computer, Map Network Drive, select a drive letter, then enter your path,
> //Public Folders/Our Enterprise
>
> Then you should be able to
> w.Documents.Open "e:\test.doc"
> or whatever drive you mapped.
>
> Good luck.
>
> "Jacques Labbe" <jacques.labbe@jus.gov.on.ca> wrote in message
> news:39C28C0F.296C8EFD@jus.gov.on.ca...
> > Thanks Ian,
> >
> > ... but my problem is with the actual path to the document. The documents
> reside
> > in the Public Folders area on an Exchange server. We normally get to them
> > through Outlook. I can open it using ShellExecute
> > "outlook://PublicFolders/etc/~document.doc"
> > but that opens Outlook then Word, then brings up a Closing Outlook dialog
> etc.
> > Messy, messy, messy!
> >
> > Using your technique and inserting my path yields error 5273 - "Document
> name or
> > path is not valid." I've tried the path every which way I can think of
> and still
> > the same result."
> >
> > Thanks
> > jacques
> >
> > Ian Drake wrote:
> >
> > > Jacques
> > >
> > > I assume that you want the document to open in a standard word
> environment...
> > >
> > > Set w = New Word.Application
> > > Dim w As Word.Application
> > > w.Documents.Open "c:\test.doc"
> > > w.Visible = True
> > >
> > > there you go..
> > > Ian Drake
> > >
> > > Jacques Labbe <jacques.labbe@jus.gov.on.ca> wrote:
> > > >Can anyone tell me how to open a Word document, sitting in a public
> > > >folder, on an Exchange server, from a VB6 app?
> > > >
> > > >My VB app is an index of documents, for example:
> > > >
> > > >//Public Folders/Our Enterprise/MyDocument.doc
> > > >
> > > >and I want our users to be able to click on a control and have the
> > > >document open.
> > > >
> > > >Any hints would be appreciated!
> > > >
> >
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks