BarApp := CreateOleObject('lppx.Application'); //
BarApp.Visible := true; //
BarDoc := BarApp.ActiveDocument;
S := ExtractFilePath(Application.ExeName) + 1.lab;
BarDoc.Open(S);
BarDoc.Variables.item('MA').Value
BarDoc.Variables.item('MB').Value
BarDoc.Variables.item('MC').Value
这个是调用1.lab这个模版打印;
请问应该怎么才能获取得1.lab里面有几个变量呢?
BarApp.Visible := true; //
BarDoc := BarApp.ActiveDocument;
S := ExtractFilePath(Application.ExeName) + 1.lab;
BarDoc.Open(S);
BarDoc.Variables.item('MA').Value
BarDoc.Variables.item('MB').Value
BarDoc.Variables.item('MC').Value
这个是调用1.lab这个模版打印;
请问应该怎么才能获取得1.lab里面有几个变量呢?
labelmatrix.好像是这么拼的!可以直接调用模板.
BarApp := CreateOleObject('lppx.Application'); //
BarApp.Visible := true; //
BarDoc := BarApp.ActiveDocument;
S := ExtractFilePath(Application.ExeName) + 1.lab;
BarDoc.Open(S); for i := 1 to BarDoc.Variables.Count do //变量的数量
begin
ListBox.AddItem(BarDoc.Variables.item(i).Name, nil);
end; BarDoc.Variables.item(i).Name //这个可能获得里面的变量