A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

I need form that will give users access to word docs.



 
 
Thread Tools Display Modes
  #1  
Old January 18th, 2007, 10:39 AM posted to microsoft.public.access.forms
scubadiver
external usenet poster
 
Posts: 1,673
Default I need form that will give users access to word docs.


Hi folks,

I have been asked to add a method for users to access archived and current
process QA documents from the DB.

The idea that springs to mind is to create a form that would allow a user to
update the location in a text box, then the user can identify the record and
press a button to open up the document in Word.

thanks

--
How many buildings collapsed on 9/11?

I can tell you the answer isn't 2 !!
  #2  
Old January 18th, 2007, 12:08 PM posted to microsoft.public.access.forms
Douglas J. Steele
external usenet poster
 
Posts: 9,313
Default I need form that will give users access to word docs.

http://www.mvps.org/access/api/api0001.htm at "The Access Web" will show you
how to allow the users to select a file (or files).

Once you know which file they want to open, use Application.FollowHyperlink
to open it.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"scubadiver" wrote in message
...

Hi folks,

I have been asked to add a method for users to access archived and current
process QA documents from the DB.

The idea that springs to mind is to create a form that would allow a user
to
update the location in a text box, then the user can identify the record
and
press a button to open up the document in Word.

thanks

--
How many buildings collapsed on 9/11?

I can tell you the answer isn't 2 !!



  #3  
Old January 18th, 2007, 01:04 PM posted to microsoft.public.access.forms
scubadiver
external usenet poster
 
Posts: 1,673
Default I need form that will give users access to word docs.


Thanks for the link. This is a new topic for me. How does it work? Do I have
to use all the code? Where does it go? The instructions aren't very clear.

Thanks

"Douglas J. Steele" wrote:

http://www.mvps.org/access/api/api0001.htm at "The Access Web" will show you
how to allow the users to select a file (or files).

Once you know which file they want to open, use Application.FollowHyperlink
to open it.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"scubadiver" wrote in message
...

Hi folks,

I have been asked to add a method for users to access archived and current
process QA documents from the DB.

The idea that springs to mind is to create a form that would allow a user
to
update the location in a text box, then the user can identify the record
and
press a button to open up the document in Word.

thanks

--
How many buildings collapsed on 9/11?

I can tell you the answer isn't 2 !!




  #4  
Old January 18th, 2007, 02:00 PM posted to microsoft.public.access.forms
Douglas J. Steele
external usenet poster
 
Posts: 9,313
Default I need form that will give users access to word docs.

Create a new module. Copy everything from the shaded section (between the
Code Start and Code End) and paste it into that module. Save the module
(making sure you don't name it the same as any of the routines in it.)

When you want to use it, use code like the 4 lines at the beginning of the
page (that example limits the input to Excel files only). For other
examples, see the TestIt and GetOpenFile functions included in what you
copied into the module.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"scubadiver" wrote in message
...

Thanks for the link. This is a new topic for me. How does it work? Do I
have
to use all the code? Where does it go? The instructions aren't very clear.

Thanks

"Douglas J. Steele" wrote:

http://www.mvps.org/access/api/api0001.htm at "The Access Web" will show
you
how to allow the users to select a file (or files).

Once you know which file they want to open, use
Application.FollowHyperlink
to open it.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"scubadiver" wrote in message
...

Hi folks,

I have been asked to add a method for users to access archived and
current
process QA documents from the DB.

The idea that springs to mind is to create a form that would allow a
user
to
update the location in a text box, then the user can identify the
record
and
press a button to open up the document in Word.

thanks

--
How many buildings collapsed on 9/11?

I can tell you the answer isn't 2 !!






  #5  
Old January 18th, 2007, 02:34 PM posted to microsoft.public.access.forms
Klatuu
external usenet poster
 
Posts: 7,074
Default I need form that will give users access to word docs.

Douglas,
FYI, In some corporate environments (where I am now, for example), the
network security settings cause problems with FollowHyperlink. I originally
tried using it to replace a Shell to open a newly created Excel spreadsheet.
When I ran it, it came up with the Windows security warning you would get if
you had your Macro Security set to Medium. I changed it to Low, but got the
same results. I tried it on a user's computer and got the same results.

Not that the FollowHyperlink is a bad thing (I like it), but just info those
who may encounter this.
--
Dave Hargis, Microsoft Access MVP


"Douglas J. Steele" wrote:

http://www.mvps.org/access/api/api0001.htm at "The Access Web" will show you
how to allow the users to select a file (or files).

Once you know which file they want to open, use Application.FollowHyperlink
to open it.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"scubadiver" wrote in message
...

Hi folks,

I have been asked to add a method for users to access archived and current
process QA documents from the DB.

The idea that springs to mind is to create a form that would allow a user
to
update the location in a text box, then the user can identify the record
and
press a button to open up the document in Word.

thanks

--
How many buildings collapsed on 9/11?

I can tell you the answer isn't 2 !!




  #6  
Old January 18th, 2007, 02:45 PM posted to microsoft.public.access.forms
Douglas J. Steele
external usenet poster
 
Posts: 9,313
Default I need form that will give users access to word docs.

Wow. Surprising I'm not being hit by that, given how overly paranoid we are
about security!

Another approach is to use Automation.

Instantiated an instance of the Word application, then open the file:

Dim objWord As Object

Set objWord = CreateObject("Word.Application")
objWord.Documents.Open "C:\Folder\File.doc"
objWord.Visible = True


--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"Klatuu" wrote in message
...
Douglas,
FYI, In some corporate environments (where I am now, for example), the
network security settings cause problems with FollowHyperlink. I
originally
tried using it to replace a Shell to open a newly created Excel
spreadsheet.
When I ran it, it came up with the Windows security warning you would get
if
you had your Macro Security set to Medium. I changed it to Low, but got
the
same results. I tried it on a user's computer and got the same results.

Not that the FollowHyperlink is a bad thing (I like it), but just info
those
who may encounter this.
--
Dave Hargis, Microsoft Access MVP


"Douglas J. Steele" wrote:

http://www.mvps.org/access/api/api0001.htm at "The Access Web" will show
you
how to allow the users to select a file (or files).

Once you know which file they want to open, use
Application.FollowHyperlink
to open it.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"scubadiver" wrote in message
...

Hi folks,

I have been asked to add a method for users to access archived and
current
process QA documents from the DB.

The idea that springs to mind is to create a form that would allow a
user
to
update the location in a text box, then the user can identify the
record
and
press a button to open up the document in Word.

thanks

--
How many buildings collapsed on 9/11?

I can tell you the answer isn't 2 !!






  #7  
Old January 18th, 2007, 02:50 PM posted to microsoft.public.access.forms
scubadiver
external usenet poster
 
Posts: 1,673
Default I need form that will give users access to word docs.


I want to restrict it to word documents. I have changed the code at the top
of the page to the following:

Dim strFilter As String
Dim strInputFileName as string

strFilter = ahtAddFilterItem(strFilter, "Word Files (*.DOC)", "*.DOC")
strInputFileName = ahtCommonFileOpenSave( _
Filter:=strFilter, OpenFile:=True, _
DialogTitle:="Please select an input file...", _
Flags:=ahtOFN_HIDEREADONLY)

Where do I put these four lines? Also is it possible to adapt the code so
that, When the dialog box is opened, it goes straight to a specific folder
(Rather than just "my documents").

Thanks


"Douglas J. Steele" wrote:

Create a new module. Copy everything from the shaded section (between the
Code Start and Code End) and paste it into that module. Save the module
(making sure you don't name it the same as any of the routines in it.)

When you want to use it, use code like the 4 lines at the beginning of the
page (that example limits the input to Excel files only). For other
examples, see the TestIt and GetOpenFile functions included in what you
copied into the module.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"scubadiver" wrote in message
...

Thanks for the link. This is a new topic for me. How does it work? Do I
have
to use all the code? Where does it go? The instructions aren't very clear.

Thanks

"Douglas J. Steele" wrote:

http://www.mvps.org/access/api/api0001.htm at "The Access Web" will show
you
how to allow the users to select a file (or files).

Once you know which file they want to open, use
Application.FollowHyperlink
to open it.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"scubadiver" wrote in message
...

Hi folks,

I have been asked to add a method for users to access archived and
current
process QA documents from the DB.

The idea that springs to mind is to create a form that would allow a
user
to
update the location in a text box, then the user can identify the
record
and
press a button to open up the document in Word.

thanks

--
How many buildings collapsed on 9/11?

I can tell you the answer isn't 2 !!






  #8  
Old January 18th, 2007, 03:00 PM posted to microsoft.public.access.forms
Douglas J. Steele
external usenet poster
 
Posts: 9,313
Default I need form that will give users access to word docs.

Put those lines of code wherever you want them invoked! For example, if you
want them to click on a button to invoke the dialog, put that code in the
Click event of the button.

To start in a specific folder, pass the function a value for InitialDir:

strInputFileName = ahtCommonFileOpenSave( _
Filter:=strFilter, OpenFile:=True, _
DialogTitle:="Please select an input file...", _
InitialDir:="C:\SomeFolder\", _
Flags:=ahtOFN_HIDEREADONLY)

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"scubadiver" wrote in message
...

I want to restrict it to word documents. I have changed the code at the
top
of the page to the following:

Dim strFilter As String
Dim strInputFileName as string

strFilter = ahtAddFilterItem(strFilter, "Word Files (*.DOC)", "*.DOC")
strInputFileName = ahtCommonFileOpenSave( _
Filter:=strFilter, OpenFile:=True, _
DialogTitle:="Please select an input file...", _
Flags:=ahtOFN_HIDEREADONLY)

Where do I put these four lines? Also is it possible to adapt the code so
that, When the dialog box is opened, it goes straight to a specific folder
(Rather than just "my documents").

Thanks


"Douglas J. Steele" wrote:

Create a new module. Copy everything from the shaded section (between the
Code Start and Code End) and paste it into that module. Save the module
(making sure you don't name it the same as any of the routines in it.)

When you want to use it, use code like the 4 lines at the beginning of
the
page (that example limits the input to Excel files only). For other
examples, see the TestIt and GetOpenFile functions included in what you
copied into the module.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"scubadiver" wrote in message
...

Thanks for the link. This is a new topic for me. How does it work? Do I
have
to use all the code? Where does it go? The instructions aren't very
clear.

Thanks

"Douglas J. Steele" wrote:

http://www.mvps.org/access/api/api0001.htm at "The Access Web" will
show
you
how to allow the users to select a file (or files).

Once you know which file they want to open, use
Application.FollowHyperlink
to open it.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"scubadiver" wrote in message
...

Hi folks,

I have been asked to add a method for users to access archived and
current
process QA documents from the DB.

The idea that springs to mind is to create a form that would allow a
user
to
update the location in a text box, then the user can identify the
record
and
press a button to open up the document in Word.

thanks

--
How many buildings collapsed on 9/11?

I can tell you the answer isn't 2 !!








  #9  
Old January 18th, 2007, 03:20 PM posted to microsoft.public.access.forms
scubadiver
external usenet poster
 
Posts: 1,673
Default I need form that will give users access to word docs.

I've got that worked out but where do I put

application.followhyperlink

thanks for your help

"Douglas J. Steele" wrote:

Put those lines of code wherever you want them invoked! For example, if you
want them to click on a button to invoke the dialog, put that code in the
Click event of the button.

To start in a specific folder, pass the function a value for InitialDir:

strInputFileName = ahtCommonFileOpenSave( _
Filter:=strFilter, OpenFile:=True, _
DialogTitle:="Please select an input file...", _
InitialDir:="C:\SomeFolder\", _
Flags:=ahtOFN_HIDEREADONLY)

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"scubadiver" wrote in message
...

I want to restrict it to word documents. I have changed the code at the
top
of the page to the following:

Dim strFilter As String
Dim strInputFileName as string

strFilter = ahtAddFilterItem(strFilter, "Word Files (*.DOC)", "*.DOC")
strInputFileName = ahtCommonFileOpenSave( _
Filter:=strFilter, OpenFile:=True, _
DialogTitle:="Please select an input file...", _
Flags:=ahtOFN_HIDEREADONLY)

Where do I put these four lines? Also is it possible to adapt the code so
that, When the dialog box is opened, it goes straight to a specific folder
(Rather than just "my documents").

Thanks


"Douglas J. Steele" wrote:

Create a new module. Copy everything from the shaded section (between the
Code Start and Code End) and paste it into that module. Save the module
(making sure you don't name it the same as any of the routines in it.)

When you want to use it, use code like the 4 lines at the beginning of
the
page (that example limits the input to Excel files only). For other
examples, see the TestIt and GetOpenFile functions included in what you
copied into the module.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"scubadiver" wrote in message
...

Thanks for the link. This is a new topic for me. How does it work? Do I
have
to use all the code? Where does it go? The instructions aren't very
clear.

Thanks

"Douglas J. Steele" wrote:

http://www.mvps.org/access/api/api0001.htm at "The Access Web" will
show
you
how to allow the users to select a file (or files).

Once you know which file they want to open, use
Application.FollowHyperlink
to open it.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"scubadiver" wrote in message
...

Hi folks,

I have been asked to add a method for users to access archived and
current
process QA documents from the DB.

The idea that springs to mind is to create a form that would allow a
user
to
update the location in a text box, then the user can identify the
record
and
press a button to open up the document in Word.

thanks

--
How many buildings collapsed on 9/11?

I can tell you the answer isn't 2 !!









  #10  
Old January 18th, 2007, 03:47 PM posted to microsoft.public.access.forms
Douglas J. Steele
external usenet poster
 
Posts: 9,313
Default I need form that will give users access to word docs.

If you want to open the file as soon as they've selected it, put

If Len(Dir(strInputFileName)) 0 Then
Application.FollowHyperlink strInputFileName
End If

right after the

strInputFileName = aht(CommonFileOpenSave(...)

If you're saving their selected files in a table, and then letting them
select from that table, put it in the appropriate event once they've
selected it.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"scubadiver" wrote in message
...
I've got that worked out but where do I put

application.followhyperlink

thanks for your help

"Douglas J. Steele" wrote:

Put those lines of code wherever you want them invoked! For example, if
you
want them to click on a button to invoke the dialog, put that code in the
Click event of the button.

To start in a specific folder, pass the function a value for InitialDir:

strInputFileName = ahtCommonFileOpenSave( _
Filter:=strFilter, OpenFile:=True, _
DialogTitle:="Please select an input file...", _
InitialDir:="C:\SomeFolder\", _
Flags:=ahtOFN_HIDEREADONLY)

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"scubadiver" wrote in message
...

I want to restrict it to word documents. I have changed the code at the
top
of the page to the following:

Dim strFilter As String
Dim strInputFileName as string

strFilter = ahtAddFilterItem(strFilter, "Word Files (*.DOC)", "*.DOC")
strInputFileName = ahtCommonFileOpenSave( _
Filter:=strFilter, OpenFile:=True, _
DialogTitle:="Please select an input file...", _
Flags:=ahtOFN_HIDEREADONLY)

Where do I put these four lines? Also is it possible to adapt the code
so
that, When the dialog box is opened, it goes straight to a specific
folder
(Rather than just "my documents").

Thanks


"Douglas J. Steele" wrote:

Create a new module. Copy everything from the shaded section (between
the
Code Start and Code End) and paste it into that module. Save the
module
(making sure you don't name it the same as any of the routines in it.)

When you want to use it, use code like the 4 lines at the beginning of
the
page (that example limits the input to Excel files only). For other
examples, see the TestIt and GetOpenFile functions included in what
you
copied into the module.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"scubadiver" wrote in message
...

Thanks for the link. This is a new topic for me. How does it work?
Do I
have
to use all the code? Where does it go? The instructions aren't very
clear.

Thanks

"Douglas J. Steele" wrote:

http://www.mvps.org/access/api/api0001.htm at "The Access Web" will
show
you
how to allow the users to select a file (or files).

Once you know which file they want to open, use
Application.FollowHyperlink
to open it.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"scubadiver" wrote in
message
...

Hi folks,

I have been asked to add a method for users to access archived
and
current
process QA documents from the DB.

The idea that springs to mind is to create a form that would
allow a
user
to
update the location in a text box, then the user can identify the
record
and
press a button to open up the document in Word.

thanks

--
How many buildings collapsed on 9/11?

I can tell you the answer isn't 2 !!











 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 03:11 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.