---
title: "java QC： 指定从QC下载的附件所存放的目录"
author: "lu_tan"
date: "2014-07-17T09:08:51Z"
tags: ["Java"]
categories: ["编程语言"]
slug: "java-qc-qc"
draft: false
lastmod: "2014-07-16T11:39:26Z"
id: 2092685
url: "https://lu-tan.iteye.com/blog/2092685"
---

ActiveXComponent attComponents = comp.getPropertyAsComponent("Attachments");
Filter attFilter = new Filter(attComponents);
ComList attes = attFilter.execute();
 
for(ActiveXComponent attComp:attes){
ActiveXComponent storage = attComp.getPropertyAsComponent("attachmentStorage");
 
storage.setProperty("ClientPath","指定附件存放目录");
 
//true:下载附件,false:不下载
attComp.invoke("load",new Variant(true));
}