cancel
Showing results for 
Search instead for 
Did you mean: 

Attachment list in a PMO

former_member279043
Discoverer
0 Kudos

I need to retrieve all the attachment file names out of a list of PMO's.  I can macro to get to the attachment list, but how do I pull the names in?

I got here and could not get it to work.

session.findById("wnd[0]").maximize

session.findById("wnd[0]/titl/shellcont/shell").pressContextButton "%GOS_TOOLBOX"

session.findById("wnd[1]/usr/tblSAPLSWUGOBJECT_CONTROL/txtSWLOBJTDYN-DEF_ATTRIB[1,0]").caretPosition = 12

session.findById("wnd[1]").sendVKey 2

session.findById("wnd[0]/titl/shellcont/shell").selectContextMenuItem "%GOS_VIEW_ATTA"

session.findById("wnd[1]/usr/cntlCONTAINER_0100/shellcont/shell").currentCellColumn = "BITM_DESCR"

session.findById("wnd[1]/usr/cntlCONTAINER_0100/shellcont/shell").selectAll

session.findById("wnd[1]/usr/cntlCONTAINER_0100/shellcont/shell").pressToolbarContextButton "&MB_EXPORT"

Session.findById("wnd[1]/usr/cntlCONTAINER_FILENAME").Text = "test.xls"

                    Session.findById("wnd[1]/usr/cntlCONTAINER_0100_FILENAME").caretPosition = 14

                    Session.findById("wnd[1]/tbar[0]/btn[11]").press

session.findById("wnd[1]/usr/cntlCONTAINER_0100/shellcont/shell").selectContextMenuItem "&XXL"

Accepted Solutions (1)

Accepted Solutions (1)

stefan_schnell
Active Contributor
0 Kudos

Hello Kevin,

you can get the content of the Title column from the Generic Object Services (GOS) with this tiny stub:

session.findById("wnd[0]/titl/shellcont/shell").pressContextButton _

  "%GOS_TOOLBOX"

session.findById("wnd[0]/titl/shellcont/shell").selectContextMenuItem _

  "%GOS_VIEW_ATTA"


Set Atta = session.findById("wnd[1]/usr/cntlCONTAINER_0100/shellcont/shell")

TitleCol = Atta.ColumnOrder().Item(1)

For i = 0 To Atta.RowCount() - 1

  MsgBox Atta.GetCellValue(i, TitleCol)

Next

Let us know your result.

Cheers

Stefan

Answers (2)

Answers (2)

former_member279043
Discoverer
0 Kudos

That was what I needed.  Thank you!

script_man
Active Contributor
0 Kudos

Hi Kevin,

I would record my own script, allowing it to work.

Regards,

ScriptMan