Extracting Author

brayshaw36

New Member
Joined
May 6, 2016
Messages
7
Using Excel2010 - If I insert my Racf code in File/Options/General/UserName Excel extracts information from Outlook Exchange Server Global Address List and shows it in File/Info/Properties Author position as surname, first name (company, dept etc). How can I extract this Author information?
AuthorName = ActiveDocument.BuiltInDocumentProperties("Author").Value returns the the racf code.
I have been offered code to open Outlook and use racf to extract this information but Outlook reports access being made to the GAL and offers 1, 5 or 10 min duration access so I would like to avoid going to Outlook and extract the information from Excel. Is it possible?
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
I don't know if this will help or not, but worth a shot.

Code:
Sub test()
MsgBox Application.UserName
End Sub
 
Upvote 0
If you want to get the authors detail from a file:
Code:
Sub Main()
  Dim o As Object
  Set o = CreateObject("shell.application").Namespace(ThisWorkbook.Path)
  MsgBox o.GetDetailsOf(o.Items.Item(ThisWorkbook.Name), 20)
End Sub
 
Last edited:
Upvote 0
If you want to get the authors detail from a file:
Code:
Sub Main()
  Dim o As Object
  Set o = CreateObject("shell.application").Namespace(ThisWorkbook.Path)
  MsgBox o.GetDetailsOf(o.Items.Item(ThisWorkbook.Name), 20)
End Sub

Thanks Kenneth - this code returned the racf code so I looked at the first 100 items but none contain the author as shown in file properties screen. This is the code I used to check:-

Sub Main()
Dim o As Object
Set o = CreateObject("shell.application").Namespace(ThisWorkbook.Path)
For i = 1 To 100
If o.GetDetailsOf(o.Items.Item(ThisWorkbook.Name), i) <> "" Then
x = x & i & " " & o.GetDetailsOf(o.Items.Item(ThisWorkbook.Name), i) & vbCrLf
End If
Next
MsgBox x
End Sub
 
Upvote 0
The details that I last checked some time back was:
0 Name
1 Size
2 Item type
3 Date modified
4 Date created
5 Date accessed
6 Attributes
7 Offline status
8 Offline availability
9 Perceived type
10 Owner
11 Kind
12 Date taken
13 Contributing artists
14 Album
15 Year
16 Genre
17 Conductors
18 Tags
19 Rating
20 Authors
21 Title
22 Subject
23 Categories
24 Comments
25 Copyright
26 #
27 Length
28 Bit rate
29 Protected
30 Camera model
31 Dimensions
32 Camera maker
33 Company
34 File description
35 Program name
36 Duration
37 Is online
38 Is recurring
39 Location
40 Optional attendee addresses
41 Optional attendees
42 Organizer address
43 Organizer name
44 Reminder time
45 Required attendee addresses
46 Required attendees
47 Resources
48 Meeting status
49 Free/busy status
50 Total size
51 Account name
52 Task status
53 Computer
54 Anniversary
55 Assistant's name
56 Assistant's phone
57 Birthday
58 Business address
59 Business city
60 Business country/region
61 Business P.O. box
62 Business postal code
63 Business state or province
64 Business street
65 Business fax
66 Business home page
67 Business phone
68 Callback number
69 Car phone
70 Children
71 Company main phone
72 Department
73 E-mail address
74 E-mail2
75 E-mail3
76 E-mail list
77 E-mail display name
78 File as
79 First name
80 Full name
81 Gender
82 Given name
83 Hobbies
84 Home address
85 Home city
86 Home country/region
87 Home P.O. box
88 Home postal code
89 Home state or province
90 Home street
91 Home fax
92 Home phone
93 IM addresses
94 Initials
95 Job title
96 Label
97 Last name
98 Mailing address
99 Middle name
100 Cell phone
101 Nickname
102 Office location
103 Other address
104 Other city
105 Other country/region
106 Other P.O. box
107 Other postal code
108 Other state or province
109 Other street
110 Pager
111 Personal title
112 City
113 Country/region
114 P.O. box
115 Postal code
116 State or province
117 Street
118 Primary e-mail
119 Primary phone
120 Profession
121 Spouse/Partner
122 Suffix
123 TTY/TTD phone
124 Telex
125 Webpage
126 Content status
127 Content type
128 Date acquired
129 Date archived
130 Date completed
131 Device category
132 Connected
133 Discovery method
134 Friendly name
135 Local computer
136 Manufacturer
137 Model
138 Paired
139 Classification
140 Status
141 Client ID
142 Contributors
143 Content created
144 Last printed
145 Date last saved
146 Division
147 Document ID
148 Pages
149 Slides
150 Total editing time
151 Word count
152 Due date
153 End date
154 File count
155 Filename
156 File version
157 Flag color
158 Flag status
159 Space free
160 Bit depth
161 Horizontal resolution
162 Width
163 Vertical resolution
164 Height
165 Importance
166 Is attachment
167 Is deleted
168 Encryption status
169 Has flag
170 Is completed
171 Incomplete
172 Read status
173 Shared
174 Creators
175 Date
176 Folder name
177 Folder path
178 Folder
179 Participants
180 Path
181 By location
182 Type
183 Contact names
184 Entry type
185 Language
186 Date visited
187 Description
188 Link status
189 Link target
190 URL
191 Media created
192 Date released
193 Encoded by
194 Producers
195 Publisher
196 Subtitle
197 User web URL
198 Writers
199 Attachments
200 Bcc addresses
201 Bcc
202 Cc addresses
203 Cc
204 Conversation ID
205 Date received
206 Date sent
207 From addresses
208 From
209 Has attachments
210 Sender address
211 Sender name
212 Store
213 To addresses
214 To do title
215 To
216 Mileage
217 Album artist
218 Album ID
219 Beats-per-minute
220 Composers
221 Initial key
222 Part of a compilation
223 Mood
224 Part of set
225 Period
226 Color
227 Parental rating
228 Parental rating reason
229 Space used
230 EXIF version
231 Event
232 Exposure bias
233 Exposure program
234 Exposure time
235 F-stop
236 Flash mode
237 Focal length
238 35mm focal length
239 ISO speed
240 Lens maker
241 Lens model
242 Light source
243 Max aperture
244 Metering mode
245 Orientation
246 People
247 Program mode
248 Saturation
249 Subject distance
250 White balance
251 Priority
252 Project
253 Channel number
254 Episode name
255 Closed captioning
256 Rerun
257 SAP
258 Broadcast date
259 Program description
260 Recording time
261 Station call sign
262 Station name
263 Summary
264 Snippets
265 Auto summary
266 Search ranking
267 Sensitivity
268 Shared with
269 Sharing status
270 Product name
271 Product version
272 Support link
273 Source
274 Start date
275 Billing information
276 Complete
277 Task owner
278 Total file size
279 Legal trademarks
280 Video compression
281 Directors
282 Data rate
283 Frame height
284 Frame rate
285 Frame width
286 Total bitrate

Note that MsgBox() will truncate data at some point.

This is how I did that list above:
Code:
'snb,http://www.snb-vba.eu/VBA_Bestanden_en.html

' http://www.tek-tips.com/viewthread.cfm?qid=1707647
Public Sub ShellColumns()
    Dim i As Long
    Dim objShell As Object
    Dim objFolder As Object
    
    Set objShell = CreateObject("Shell.Application")
    'Set objFolder = objShell.Namespace("C:\")
    
    Do Until objFolder.GetDetailsOf(objFolder.Items, i) = ""
        'Debug.Print i, objFolder.GetDetailsOf(objFolder.Items, i)
        Cells(i + 1, 1).Value = i
        Cells(i + 1, 2).Value = objFolder.GetDetailsOf(objFolder.Items, i)
        i = i + 1
    Loop
End Sub
 
Last edited:
Upvote 0
The details that I last checked some time back was:


Note that MsgBox() will truncate data at some point.

This is how I did that list above:
Code:
'snb,http://www.snb-vba.eu/VBA_Bestanden_en.html

' http://www.tek-tips.com/viewthread.cfm?qid=1707647
Public Sub ShellColumns()
    Dim i As Long
    Dim objShell As Object
    Dim objFolder As Object
    
    Set objShell = CreateObject("Shell.Application")
    'Set objFolder = objShell.Namespace("C:\")
    
    Do Until objFolder.GetDetailsOf(objFolder.Items, i) = ""
        'Debug.Print i, objFolder.GetDetailsOf(objFolder.Items, i)
        Cells(i + 1, 1).Value = i
        Cells(i + 1, 2).Value = objFolder.GetDetailsOf(objFolder.Items, i)
        i = i + 1
    Loop
End Sub

Thanks Kenneth - I changed my code to look at 500 items but the info is not present.
 
Upvote 0
Is it an excel property or custom propert and not a file system property? See chip pearson's web site for his properties macros.
 
Upvote 0

Forum statistics

Threads
1,223,246
Messages
6,170,996
Members
452,373
Latest member
TimReeks

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top