Plugins for PDF to be installed for Qt
-
when i run in one system it is working , but in other system i ma getting this error
QAxBase::dynamicCallHelper: ExportAsFixedFormat(QVariant,QVariant,QVariant): No such property in [Microsoft Word Document]
Candidates are:
Email
EmbedLinguisticData
EmbedSmartTags
EmbedTrueTypeFonts
Endnotes
EnforceStyle
EnvelopeDonno the reason behind this.
@harsha123 said in Plugins for PDF to be installed for Qt:
QAxBase::dynamicCallHelper: ExportAsFixedFormat(QVariant,QVariant,QVariant): No such property in [Microsoft Word Document]
Candidates are:
Email
EmbedLinguisticData
EmbedSmartTags
EmbedTrueTypeFontsOK, I've had a quick look at this. If you Google e.g.
Word EmbedTrueTypeFonts
you come to https://docs.microsoft.com/en-us/office/vba/api/word.document.embedtruetypefonts. If you look through the index on the left that is indeed a property. ButExportAsFixedFormat
is a method, at https://docs.microsoft.com/en-us/office/vba/api/word.document.exportasfixedformat. I am unsure whether the error message referring to a "property" has or has not looked for it as a method. You might try with another method from there, such asSave()
orRepaginate()
, to see whether those do work as "methods"? -
when i use save file getting created but when try to open the file it is showing some thing went wrong ,i didnt work on Repaginate i will try that once..
@harsha123
One thing: are the versions of Word the same on both machines? Same version of Word, and not one has Microsoft/Office 365 installed locally while the other uses it only from the web? -
So did you actually tried to save a doc in Word 2003 as PDF? Did it work? I would guess not because saving to PDF was added later...
-
Yeah in both systems word versions are different in one system (non working) it is 2003 and in other system it is 2019.
@harsha123
Ahhhhhhhhhhhhhhhhhhhhhhhhhh. It really helps if you check and state this in the first place!https://stackoverflow.com/questions/60342174/word-exportasfixedformat claims to have it working in Word 2019. It might be worth a try passing all the same number of parameters as you see in that example code, in case 2019
ExportAsFixedFormat
requires more parameters than before, i don't know.P.S.
Only the first 2 parameters are mandatory. TryExportAsFixedFormat(QVariant,QVariant)
or whatever it is you presently have but omit the third parameter for "OpenAfterExport", just in case that works instead (though I don't think so, but worth a try). -
Ok u mean in working system i need to install 2003 version and check once, because with 2019 it is working
@harsha123 said in Plugins for PDF to be installed for Qt:
because with 2019 it is working
Do you mean NOT working??
WAIT
one system (non working) it is 2003
OMG. Word 2003 is too old to have
ExportAsFixedFormat
, no wonder!! (And probably does not export to PDF at all; I did ask you to verify that it worked on the failing system just from within Word, forget about Qt?) Why not say that from the outset? Who in the world uses Word 2003 in 2022...? This is your whole issue...... Please supply such relevant information in the first place when you ask a question, this whole thing has been a wild goose chase..... -
@harsha123
That's why you needed to check the non-working system's PDF export from within Word before you tried to access it from Qt :)