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  

Using Access forms to open other documents



 
 
Thread Tools Display Modes
  #11  
Old June 13th, 2006, 07:23 PM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default Using Access forms to open other documents

Thanks strive,

I think i got it working now Great help from you and Alvin!

Herman

  #12  
Old June 13th, 2006, 10:37 PM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default Using Access forms to open other documents

you're welcome, Herman happy to help

btw, its ARvin...

Warm Regards,
Crystal
Microsoft Access MVP 2006

*
Have an awesome day

remote programming and training
strive4peace2006 at yahoo.com

*

wrote:
Thanks strive,

I think i got it working now Great help from you and Alvin!

Herman

  #13  
Old June 15th, 2006, 08:32 PM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default Using Access forms to open other documents

Oops! My mistake Arvin :P I didn't mean to mispell your name.

I do have a followup question to add now...

Is there a way to use that api
(http://www.mvps.org/access/api/api0018.htm) and when I open the
document from within Access, have it force the file to be read-only? As
my database is to control the latest revisions of documents, I would
not want someone to open a doc and inadvertently save it after his/her
own changes. I realize that one can just set the read-only property
when u right-click on the file itself, but i was curious if there was a
way to do that in Access?

Furthermore, would it be possible to grab the file properties of any
windows registered file (i.e. .xls, .doc, etc) and update that in my
table? For example, is there a way to grab the "last modified"
information from an excel file's properties and read that into a table
in Access? Right now I am just manually typing in that info, so there
won't be any automation when the actual file is modified. That would be
a great bonus feature!

Thanks,
Herman

  #14  
Old June 15th, 2006, 09:42 PM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default Using Access forms to open other documents -- make file read-only

Hi Herman

before you shell out, make file read-only:
SetAttr "c:\path\Filename.ext", vbReadOnly

you can use GetAttr to get attributes


Warm Regards,
Crystal
Microsoft Access MVP 2006

*
Have an awesome day

remote programming and training
strive4peace2006 at yahoo.com

*

wrote:
Oops! My mistake Arvin :P I didn't mean to mispell your name.

I do have a followup question to add now...

Is there a way to use that api
(
http://www.mvps.org/access/api/api0018.htm) and when I open the
document from within Access, have it force the file to be read-only? As
my database is to control the latest revisions of documents, I would
not want someone to open a doc and inadvertently save it after his/her
own changes. I realize that one can just set the read-only property
when u right-click on the file itself, but i was curious if there was a
way to do that in Access?

Furthermore, would it be possible to grab the file properties of any
windows registered file (i.e. .xls, .doc, etc) and update that in my
table? For example, is there a way to grab the "last modified"
information from an excel file's properties and read that into a table
in Access? Right now I am just manually typing in that info, so there
won't be any automation when the actual file is modified. That would be
a great bonus feature!

Thanks,
Herman

  #15  
Old June 16th, 2006, 11:00 AM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default Using Access forms to open other documents

No harm.

If you want to change the file attributes, Crystal's code is the trick. If
you want to protect the document itself from within an automation instance
(in this case using an Early bound reference) try something like this code
stub:

Dim objWord As Word.Application
Set objWord = CreateObject("Word.Application")

WordTemplate = Application.CurrentProject.Path & "\Letter.dot"

With objWord
.Visible = True
.Documents.Add (WordTemplate)

' If document is protected, Unprotect it.
If .ActiveDocument.ProtectionType wdNoProtection Then
.ActiveDocument.Unprotect Password:=""
End If

' Do something here, then

' ReProtect the document.
If .ActiveDocument.ProtectionType = wdNoProtection Then
.ActiveDocument.Protect Type:=wdAllowOnlyFormFields,
NoReset:=True
End If
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads
http://www.datastrat.com
http://www.mvps.org/access

wrote in message
oups.com...
Oops! My mistake Arvin :P I didn't mean to mispell your name.

I do have a followup question to add now...

Is there a way to use that api
(http://www.mvps.org/access/api/api0018.htm) and when I open the
document from within Access, have it force the file to be read-only? As
my database is to control the latest revisions of documents, I would
not want someone to open a doc and inadvertently save it after his/her
own changes. I realize that one can just set the read-only property
when u right-click on the file itself, but i was curious if there was a
way to do that in Access?

Furthermore, would it be possible to grab the file properties of any
windows registered file (i.e. .xls, .doc, etc) and update that in my
table? For example, is there a way to grab the "last modified"
information from an excel file's properties and read that into a table
in Access? Right now I am just manually typing in that info, so there
won't be any automation when the actual file is modified. That would be
a great bonus feature!

Thanks,
Herman



  #16  
Old June 16th, 2006, 05:28 PM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default Using Access to open other documents -- get file modificationdate

Hi Herman,

to get the modification date of a file, here is some code
you can adapt:

'~~~~~~~~~~~~~~
'NEEDS REFERENCE to Microsoft Scripting Runtime
'Tools, References from a VBA module

Dim mfile As Scripting.File

Dim fso As Scripting.FileSystemObject
Set fso = CreateObject("Scripting.FileSystemObject")

For Each mfile In fso.GetFolder("c:\path").Files

msgbox "Modified: " & mfile.DateLastModified _
, , mfile.Name

Next mfile
'~~~~~~~~~~~~~~

Warm Regards,
Crystal
Microsoft Access MVP 2006

*
Have an awesome day

remote programming and training
strive4peace2006 at yahoo.com

*

wrote:
Oops! My mistake Arvin :P I didn't mean to mispell your name.

I do have a followup question to add now...

Is there a way to use that api
(
http://www.mvps.org/access/api/api0018.htm) and when I open the
document from within Access, have it force the file to be read-only? As
my database is to control the latest revisions of documents, I would
not want someone to open a doc and inadvertently save it after his/her
own changes. I realize that one can just set the read-only property
when u right-click on the file itself, but i was curious if there was a
way to do that in Access?

Furthermore, would it be possible to grab the file properties of any
windows registered file (i.e. .xls, .doc, etc) and update that in my
table? For example, is there a way to grab the "last modified"
information from an excel file's properties and read that into a table
in Access? Right now I am just manually typing in that info, so there
won't be any automation when the actual file is modified. That would be
a great bonus feature!

Thanks,
Herman

 




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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Visio Shortcuts [email protected] Visio 1 December 28th, 2006 11:28 PM
MDW Derrick New Users 7 May 15th, 2006 08:59 AM
open access in office access not access for windows Bill_De General Discussion 6 March 1st, 2006 07:19 PM
Can't open Access Forms Amir Marathonian General Discussion 1 January 20th, 2006 12:04 AM
Why is a French Spellchecker a "required" update for English speak French Spellcheck Required? General Discussion 23 April 26th, 2005 01:17 AM


All times are GMT +1. The time now is 05:11 PM.


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