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. |
|
|
|
Thread Tools | Display Modes |
#11
|
|||
|
|||
Using Access forms to open other documents
Thanks strive,
I think i got it working now Great help from you and Alvin! Herman |
#12
|
|||
|
|||
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
|
|||
|
|||
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 |
#15
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|
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 |