我有一个嵌入在Excel中的PowerPoint演示文稿,我正在使用宏打开它,然后要将打开的演示文稿保存到C盘中
我尝试了以下代码,但无法将Powerpoint保存到所需的目的地。
app.get('/test', (req, res) => {
let APIKey = 'Udt4dOLtw4TI7mEhfSZHJ5TbgGC9q7kB';
let SecretKey = 'HV7bzQrDmUJpVz1UyjWpy2sle9Ly/WYj';
hitbtc.auth(APIKey, SecretKey);
let buy = [];
let sell = [];
hitbtc.symbols().then(symbols => {
symbols.forEach((symbol) => {
let open = [];
let timeStamp = [];
let i = 0;
console.log(symbol.id);
hitbtc.candles(symbol.id, {limit: 15, period: "H1"}).then(result => {
result.forEach(element => {
open.push(element.open);
timeStamp.push(element.timestamp);
});
tulind.indicators.rsi.indicator([open], [14], function (err, results) {
if (results[0] > 80) {
console.log("sell : ", symbol.id, " RSI value : ", results[0]);
sell.push(symbol.id);
} else if (results[0] < 20) {
console.log("buy : ", symbol.id, " RSI value : ", results[0]);
buy.push(symbol.id);
}
});
res.status(200).json({
success: true,
buy: buy,
sell: sell
});
})
.catch(e => {
//console.log(e);
});
});
});
});
我希望将打开的幻灯片保存在C:\ Release_Review \中,然后将名称命名为Release_ReviewTodays_date
答案 0 :(得分:0)
首先,您可以使用OLEObject
对象来引用您的对象。其次,3
似乎不是有效的动词。请尝试以下操作...
Sub openppt()
Dim oleObj As OLEObject
Set oleObj = Worksheets("SupportData").OLEObjects("Object 7")
oleObj.Verb xlVerbOpen
Dim pres As Object
Set pres = oleObj.Object
pres.SaveAs "C:\Release_Review\Release_Review" & Date & ".pptx"
End Sub