Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 05-14-2014, 01:25 AM
Sammie0Sue Sammie0Sue is offline Inserting the date a spreadsheet was saved into another document Windows 7 64bit Inserting the date a spreadsheet was saved into another document Office 2010 64bit
Novice
Inserting the date a spreadsheet was saved into another document
 
Join Date: Nov 2013
Posts: 21
Sammie0Sue is on a distinguished road
Post Inserting the date a spreadsheet was saved into another document

Hi All

Please could someone help me. I have a client that will be updated an excel spreadsheet - the spreadsheet then auto populates Rich text content controls in a word document.



They want to add a validity date into the word form that will show them when last the excel spreadsheet was saved.

Is there a way to do this I know I can insert a date in word for when the form was last saved but I cant figure out how to insert the date the spreadsheet was last saved.
Reply With Quote
  #2  
Old 05-15-2014, 01:14 AM
macropod's Avatar
macropod macropod is offline Inserting the date a spreadsheet was saved into another document Windows 7 32bit Inserting the date a spreadsheet was saved into another document Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 20,346
macropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant future
Default

You could use a function like:
Code:
Function GettFileDate(StrNm As String)
'Requires Reference to Microsoft Scripting Runtime
    Dim fso As Scripting.FileSystemObject
    Set fso = CreateObject("Scripting.FileSystemObject")
    GettFileDate = fso.GetFile(StrNm).DateLastModified
End Function
which you could call with a line like:
MsgBox GettFileDate("C:\Users\" & Environ("UserName") & "\Documents\ExcelWorkbook.xls")
__________________
Cheers,
Paul Edstein
[MS MVP - Word]
Reply With Quote
Reply

Tags
dates excel fields

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Please Help! Need auto populated last saved date. Neveradayoff Excel 0 02-05-2014 09:42 AM
Inserting the date a spreadsheet was saved into another document Run-time error '1004': Document not saved. The document may be open... doctor_who12 Excel Programming 1 01-22-2014 04:47 PM
Inserting the date a spreadsheet was saved into another document Disappearing Saved MS Excel Spreadsheet Names ReallyFreeSpirit Excel 3 05-03-2013 02:50 PM
Inserting spreadsheet data rows as form fields in a document b3nz Word 3 03-31-2013 07:47 PM
Inserting the date a spreadsheet was saved into another document Inserting excel spreadsheet into word doc educpara58 Excel 2 07-28-2011 01:22 AM

Other Forums: Access Forums - Senior Forums

All times are GMT -7. The time now is 10:33 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2020 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft