Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Can I show the docproperties of a document next to it's hyperlink.
I have created a kind of index document that has hyperlinks to a whole bunch
of other documents spread around the server to make them easier to find. I want to put a field next to each hyperlink that will show the 'docproperties lastsavedtime' for the file that the link relates to. Is it possible or does docproperties only display the info for the current document? |
#2
|
|||
|
|||
Yes, DocProperties applies only to the current document. You'd need a macro
to do what you describe. "Tom_Illingworth" wrote in message ... I have created a kind of index document that has hyperlinks to a whole bunch of other documents spread around the server to make them easier to find. I want to put a field next to each hyperlink that will show the 'docproperties lastsavedtime' for the file that the link relates to. Is it possible or does docproperties only display the info for the current document? |
#3
|
|||
|
|||
I'm scared of Macro's - any pointers on how to write a macro that would
achieve what i'm after? Thanks "Jezebel" wrote: Yes, DocProperties applies only to the current document. You'd need a macro to do what you describe. "Tom_Illingworth" wrote in message ... I have created a kind of index document that has hyperlinks to a whole bunch of other documents spread around the server to make them easier to find. I want to put a field next to each hyperlink that will show the 'docproperties lastsavedtime' for the file that the link relates to. Is it possible or does docproperties only display the info for the current document? |
#4
|
|||
|
|||
Retrieving the properties from another document is easy enough. The
challenges here are a) what triggers the macro - how often do you want to refresh the properties from the source documents? b) which properties do you want? - there are dozens of built-ins, and for any given document the set of custom properties is open-ended c) what do you want to do with the retrieved values? To give you a taste of it, paste this into a code module and run it Public Sub XYZ() Dim pProp As Office.DocumentProperty Dim pDoc As Word.Document Set pDoc = Documents.Open("C:\.....doc") ----- add a real file name here On Error Resume Next For Each pProp In pDoc.BuiltInDocumentProperties Debug.Print pProp.Name, pProp.Value Next For Each pProp In pDoc.CustomDocumentProperties Debug.Print pProp.Name, pProp.Value Next End Sub "Tom_Illingworth" wrote in message news I'm scared of Macro's - any pointers on how to write a macro that would achieve what i'm after? Thanks "Jezebel" wrote: Yes, DocProperties applies only to the current document. You'd need a macro to do what you describe. "Tom_Illingworth" wrote in message ... I have created a kind of index document that has hyperlinks to a whole bunch of other documents spread around the server to make them easier to find. I want to put a field next to each hyperlink that will show the 'docproperties lastsavedtime' for the file that the link relates to. Is it possible or does docproperties only display the info for the current document? |
#5
|
|||
|
|||
Thanks for that - i've been trying to give myself a crash course in macros but I wasn't anywhere near what you've got! What I am wanting to do is have a list of hyperlinks in an index something like this: Link to Document 1 last updated: [savedate for document 1 dd/mm/yy] Link to Document 2 last updated: [savedate for document 2 dd/mm/yy] etc. I would then need the macro to refresh the last saved fields for all the documents each time the index file was opened. Is this possible? "Jezebel" wrote: Retrieving the properties from another document is easy enough. The challenges here are a) what triggers the macro - how often do you want to refresh the properties from the source documents? b) which properties do you want? - there are dozens of built-ins, and for any given document the set of custom properties is open-ended c) what do you want to do with the retrieved values? To give you a taste of it, paste this into a code module and run it Public Sub XYZ() Dim pProp As Office.DocumentProperty Dim pDoc As Word.Document Set pDoc = Documents.Open("C:\.....doc") ----- add a real file name here On Error Resume Next For Each pProp In pDoc.BuiltInDocumentProperties Debug.Print pProp.Name, pProp.Value Next For Each pProp In pDoc.CustomDocumentProperties Debug.Print pProp.Name, pProp.Value Next End Sub "Tom_Illingworth" wrote in message news I'm scared of Macro's - any pointers on how to write a macro that would achieve what i'm after? Thanks "Jezebel" wrote: Yes, DocProperties applies only to the current document. You'd need a macro to do what you describe. "Tom_Illingworth" wrote in message ... I have created a kind of index document that has hyperlinks to a whole bunch of other documents spread around the server to make them easier to find. I want to put a field next to each hyperlink that will show the 'docproperties lastsavedtime' for the file that the link relates to. Is it possible or does docproperties only display the info for the current document? |
#6
|
|||
|
|||
Yes it's possible. If you write a macro called AutoOpen and attach it to the
document, it will run each time the document is opened. But you're throwing yourself in the deep end if you don't know much about coding macros. Do you really want to invest the time learning to swim in this pond? If all the linked files are in the same folder, you can display the folder in Windows Explorer set to details view -- that will show you the date last saved. Mightn't be as elegant or convenient as you'd, but there's zero effort in doing it, and zero maintenance ... "Tom_Illingworth" wrote in message ... Thanks for that - i've been trying to give myself a crash course in macros but I wasn't anywhere near what you've got! What I am wanting to do is have a list of hyperlinks in an index something like this: Link to Document 1 last updated: [savedate for document 1 dd/mm/yy] Link to Document 2 last updated: [savedate for document 2 dd/mm/yy] etc. I would then need the macro to refresh the last saved fields for all the documents each time the index file was opened. Is this possible? "Jezebel" wrote: Retrieving the properties from another document is easy enough. The challenges here are a) what triggers the macro - how often do you want to refresh the properties from the source documents? b) which properties do you want? - there are dozens of built-ins, and for any given document the set of custom properties is open-ended c) what do you want to do with the retrieved values? To give you a taste of it, paste this into a code module and run it Public Sub XYZ() Dim pProp As Office.DocumentProperty Dim pDoc As Word.Document Set pDoc = Documents.Open("C:\.....doc") ----- add a real file name here On Error Resume Next For Each pProp In pDoc.BuiltInDocumentProperties Debug.Print pProp.Name, pProp.Value Next For Each pProp In pDoc.CustomDocumentProperties Debug.Print pProp.Name, pProp.Value Next End Sub "Tom_Illingworth" wrote in message news I'm scared of Macro's - any pointers on how to write a macro that would achieve what i'm after? Thanks "Jezebel" wrote: Yes, DocProperties applies only to the current document. You'd need a macro to do what you describe. "Tom_Illingworth" wrote in message ... I have created a kind of index document that has hyperlinks to a whole bunch of other documents spread around the server to make them easier to find. I want to put a field next to each hyperlink that will show the 'docproperties lastsavedtime' for the file that the link relates to. Is it possible or does docproperties only display the info for the current document? |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Inserting the same hyperlink on all pages in a document | Microsoft Word Help | |||
insert document as attachement after inserting email hyperlink | Microsoft Word Help | |||
document closes when I click on hyperlink to another document | Microsoft Word Help | |||
Inserting a hyperlink - Place in this document | Microsoft Word Help | |||
Hyperlink in a word document | Microsoft Word Help |