Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'm trying to put into Excel a procedure that I have put into Word
(through the assistance of Greg Maxey). There seems to be two issues: making some procedure operate by default, and using the correct code. For the first problem, I followed the online help and tried to put the code in a workbook and then saved the workbook as \\%userprofile%\application data\microsoft\templates\book.xlt . When that did not work, I saved it as c:\program files\microsoft office\office11\xlstart\book.xlt . That did not work either, so I don't know if the process was incorrect or if the code--which is verbatim the same as I used in Word--is incorrect (since I know next to nothing about VBA), or something else is incorrect. Here's the code I used: Sub AutoOpen() If ActiveDocument.BuiltInDocumentProperties("Title") = "" Then With Dialogs(wdDialogFileSummaryInfo) .Show End With End If End Sub Sub AutoClose() If ActiveDocument.BuiltInDocumentProperties("Title") = "" Then With Dialogs(wdDialogFileSummaryInfo) .Show End With End If End Sub So... can anyone point me in the right direction on making Excel always prompt for a Title if the Title properties field is blank? (And the reason I need it on both open and close has to do with automatic document creation generated sometimes by a different program.) TIA |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel 2003 + script to open and automatically close an excel workb | Excel Discussion (Misc queries) | |||
Open an Excel document in 2007 document using the 2003 office | Excel Programming | |||
Can I protect a document and still open / close groups | Excel Worksheet Functions | |||
Disabling Document AutoRecovery in Excel by script | Excel Discussion (Misc queries) | |||
Use VB in Excel to close open Word Document | Excel Programming |