void onPrintBtn()
{
//1. open SaveDialog and get a file name
if (last_path_.isEmpty())
{
QString path = QStandardPaths::standardLocations(QStandardPaths::DocumentsLocation).at(0);
QDir::root().mkpath(path);
last_path_ = path;
}
QString default_dir_name = last_path_ + "/" + ui_->leIssueCode->text();
QString fileName = QFileDialog::getSaveFileName(this, "Save File",
default_dir_name,
"Word (*.doc)");
//save the current dir for next time
last_path_ = fileName.left(fileName.lastIndexOf('/'));
if(fileName.isEmpty()) {
qDebug()
QAxObject *document=word.querySubObject("ActiveDocument");
if(!document) {
qDebug() << "Quering ActiveDocument failed " << endl;