Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() I did a search on the forums to no avail... Can you programmatically change the default Author setting for Excel? I see you can return it, but I can't see how to set it! I am running an Access database which allows users to export data to Excel. When they do this, however, I want their username to be the Author attribute of the documents that they create. How can I do this? I can set the attribute for an individual workbook, but I want to change it in their Excel options. Thanks!! -- tkstock ------------------------------------------------------------------------ tkstock's Profile: http://www.excelforum.com/member.php...o&userid=14443 View this thread: http://www.excelforum.com/showthread...hreadid=379129 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Good evening Tom Try going to Tools Options, General tab, Username. This is the name that Excel uses as the author in the file properties. HTH DominicB -- dominicb ------------------------------------------------------------------------ dominicb's Profile: http://www.excelforum.com/member.php...o&userid=18932 View this thread: http://www.excelforum.com/showthread...hreadid=379129 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() I appreciate your post, however, I am looking to do thi programatically. I know how to do this manually -- tkstoc ----------------------------------------------------------------------- tkstock's Profile: http://www.excelforum.com/member.php...fo&userid=1444 View this thread: http://www.excelforum.com/showthread.php?threadid=37912 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hi Tom I answered the question that you asked using the information you supplied. In the light of what you've just posted, this might help. Sub Test() Application.UserName = "DominicB" End Sub HTH DominicB -- dominicb ------------------------------------------------------------------------ dominicb's Profile: http://www.excelforum.com/member.php...o&userid=18932 View this thread: http://www.excelforum.com/showthread...hreadid=379129 |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() dominicb Wrote: I answered the question that you asked using the information you supplied. I guess you missed the part where I stated Can you programmatically change the default Author setting for Excel? I see you can return it, but I can't see how to set it! I felt it was pretty clear, but I could be mistaken. -- tkstock ------------------------------------------------------------------------ tkstock's Profile: http://www.excelforum.com/member.php...o&userid=14443 View this thread: http://www.excelforum.com/showthread...hreadid=379129 |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() BTW, your code does what I was looking for it to do. Thanks for your help -- tkstoc ----------------------------------------------------------------------- tkstock's Profile: http://www.excelforum.com/member.php...fo&userid=1444 View this thread: http://www.excelforum.com/showthread.php?threadid=37912 |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() You're welcome. Dominic -- dominic ----------------------------------------------------------------------- dominicb's Profile: http://www.excelforum.com/member.php...fo&userid=1893 View this thread: http://www.excelforum.com/showthread.php?threadid=37912 |
#8
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Ultimately, the purpose of this exercise was for an Access database. I some cases I instantiate XL spreadsheets on the fly - I wanted to se the author to be the database and username. This works fine if th spreadsheet is created in code using the XL object. However, if I use an Access function like this: Code ------------------- DoCmd.OutputTo acOutputQuery, "qry_MyQuery", acFormatXLS, , Tru ------------------- the author attribute is NOT set (as a matter of fact, it is blank!). This is my current problem. More Info: What I am currently doing is this: when the user logs int the database, I grab the current value of Excel.Application.Username. Then, anytime I create a spreadsheet, I change the E.A.Username t "MyDatabase(user)", then I create and save the spreadsheet, then change it back to the orginal value. The only time this doesn't wor is if I use the Access function described above. Any thoughts -- tkstoc ----------------------------------------------------------------------- tkstock's Profile: http://www.excelforum.com/member.php...fo&userid=1444 View this thread: http://www.excelforum.com/showthread.php?threadid=37912 |
#9
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hi Tom Unfortunately not. According to Excel's help files the only way to access the author name is to use theBuiltInDocumentProperties structure thus: Sub Test() a = ActiveWorkbook.BuiltinDocumentProperties("Author") .Value MsgBox a End Sub which is a read-only setting and hence no good to you. Although using legitimate instructions, XL doesn't seem to like communicating all file properties to Access. Stumped! Sorry I cannot be of any further help. DominicB -- dominicb ------------------------------------------------------------------------ dominicb's Profile: http://www.excelforum.com/member.php...o&userid=18932 View this thread: http://www.excelforum.com/showthread...hreadid=379129 |
#10
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
which is a read-only setting and hence no good to you.
It is not a read-only setting. You can set the 'Author' property with code: ThisWorkbook.BuiltinDocumentProperties("Author").V alue = _ "New Author Name" MsgBox ThisWorkbook.BuiltinDocumentProperties("Author").V alue -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "dominicb" wrote in message ... Hi Tom Unfortunately not. According to Excel's help files the only way to access the author name is to use theBuiltInDocumentProperties structure thus: Sub Test() a = ActiveWorkbook.BuiltinDocumentProperties("Author") .Value MsgBox a End Sub which is a read-only setting and hence no good to you. Although using legitimate instructions, XL doesn't seem to like communicating all file properties to Access. Stumped! Sorry I cannot be of any further help. DominicB -- dominicb ------------------------------------------------------------------------ dominicb's Profile: http://www.excelforum.com/member.php...o&userid=18932 View this thread: http://www.excelforum.com/showthread...hreadid=379129 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel author name | Excel Discussion (Misc queries) | |||
want to see excel author name tab | Excel Discussion (Misc queries) | |||
Add author in Excel 2007 | Excel Discussion (Misc queries) | |||
Is there an author field in Excel? | Excel Discussion (Misc queries) | |||
Is there an author field in Excel? | Excel Discussion (Misc queries) |