Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default Author's Name

I would like the document to save the Application.UserName as the Author of
the document when the document is saved. So when you check the properties of
the document and go to the Summary tab, the author of the document will be
listed as the Application.UserName.

Thanks,
Larry
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default Author's Name


Try this...

ThisWorkbook.Author = Application.UserName

or maybe this...

ActiveWorkbook.Author = Application.UserName

--
Rick (MVP - Excel)


"Larry S" wrote in message
...
I would like the document to save the Application.UserName as the Author of
the document when the document is saved. So when you check the properties
of
the document and go to the Summary tab, the author of the document will be
listed as the Application.UserName.

Thanks,
Larry


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default Author's Name

This worked fine for the application i had intended it for, which was to run
it inside a saveas macro that i had previously created. So that issue is
resolved, but to take it one step further how do you achieve the same result
by simply using the excel save or saveas command? The reason i would need to
do this is because unlike saving a workbook that was created locally by
starting excel, the workbooks are templates stored on our server and when you
do a saveas nothing is stored in the author field.


"Rick Rothstein" wrote:

Try this...

ThisWorkbook.Author = Application.UserName

or maybe this...

ActiveWorkbook.Author = Application.UserName

--
Rick (MVP - Excel)


"Larry S" wrote in message
...
I would like the document to save the Application.UserName as the Author of
the document when the document is saved. So when you check the properties
of
the document and go to the Summary tab, the author of the document will be
listed as the Application.UserName.

Thanks,
Larry



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default Author's Name

I don't have network access so I can't duplicate your set up for testing;
however, to speculate... I'm thinking that nothing gets stored in the author
field because there is nothing in the Application.UserName field (I think
Excel gets this from the General tab on Tools/Options which I'm guessing
your templates don't have filled in either). Maybe you could reach out to
the operating system and do something like this...

ActiveWorkbook.Author = Environ("UserName")

--
Rick (MVP - Excel)


"Larry S" wrote in message
...
This worked fine for the application i had intended it for, which was to
run
it inside a saveas macro that i had previously created. So that issue is
resolved, but to take it one step further how do you achieve the same
result
by simply using the excel save or saveas command? The reason i would need
to
do this is because unlike saving a workbook that was created locally by
starting excel, the workbooks are templates stored on our server and when
you
do a saveas nothing is stored in the author field.


"Rick Rothstein" wrote:

Try this...

ThisWorkbook.Author = Application.UserName

or maybe this...

ActiveWorkbook.Author = Application.UserName

--
Rick (MVP - Excel)


"Larry S" wrote in message
...
I would like the document to save the Application.UserName as the Author
of
the document when the document is saved. So when you check the
properties
of
the document and go to the Summary tab, the author of the document will
be
listed as the Application.UserName.

Thanks,
Larry




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 245
Default Author's Name

Try ...

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
ThisWorkbook.BuiltinDocumentProperties(3) = Application.UserName
End Sub

"Larry S" wrote:

I would like the document to save the Application.UserName as the Author of
the document when the document is saved. So when you check the properties of
the document and go to the Summary tab, the author of the document will be
listed as the Application.UserName.

Thanks,
Larry



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
save a file with author's name april Excel Discussion (Misc queries) 3 March 17th 10 03:51 PM
Insert current author's name in cell or footer in Excel?? dneal53 Setting up and Configuration of Excel 1 January 30th 06 04:50 PM
how do i automatically insert the current author's name in a cell. Nolin Excel Worksheet Functions 1 April 8th 05 04:38 AM
Supress author's name in displayed comment? John Wirt Excel Programming 3 September 21st 04 03:09 AM


All times are GMT +1. The time now is 12:22 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"