Hello,
I have been able to convert regular word (.doc and .docx) file to pdf using the onedrive for Business - convert file option. However, I am running into issue with converting a docm file. Looking through following documentation, the file format is not supported. However, I was wondering if anyone has found a workaround.
https://docs.microsoft.com/en-us/connectors/onedriveforbusiness/#convert-file-(preview)
Thank You
I was able to successfully run both the options.
But my files were very simple ones with one liner text contained in them.
In option 1, I am not using the Convert file. Just "Get file content" and "Create file" were enough to create the docx file.
In option 2, I have simply used one action "Copy file using Path" and in the Destination File Path gave Test.docx
Both the options gave me docx files.
However, there is a caveat to both these options.
They both did create the docx files on OneDrive. I was able to open and see the contents when opened in Word online itself. But the contents were not visible when opened in the desktop app.
You can try them out and see if that is workable for you.
These are not actual conversion methods so not recommended options.
Just thought of giving some inputs since there is nothing in-built as of now.
Option 1:
Error:
Error from Office Service. Url=https://wordcs.officeapps.live.com/document/export/pdf HttpCode=UnsupportedMediaType cert=subject:;thumbprint: ResponseHeaders=X-ErrorCode: WordDocumentHasMetroMEContentNonMetroMEExtension
X-ClientCorrelationId: 4e619cbb-47f2-488b-b7e0-1d9090ac69a4
X-ServiceCorrelationId: 4e619cbb-47f2-488b-b7e0-1d9090ac69a4
X-ErrorCategory: NotSupported
X-IsRetriable: False
X-ConversionTimeInMs: 156.2541
X-FileDownloadTimeInMs: 531.2618
Cache-Control: private
Date: Wed, 03 Nov 2021 13:36:13 GMT
Server: Microsoft-IIS/10.0
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
I get the same error with option 2.
I have also tried converting the file content to base64 and changing the content type to word, and see if it would lose the macros. No dice.
Error:
Error from Office Service. Url=https://wordcs.officeapps.live.com/document/export/pdf HttpCode=UnsupportedMediaType cert=subject:;thumbprint: ResponseHeaders=X-ErrorCode: WordDocumentHasMetroMEContentNonMetroMEExtension
X-ClientCorrelationId: cfc50925-bf6c-4b05-ad0e-eefad42f065f
X-ServiceCorrelationId: cfc50925-bf6c-4b05-ad0e-eefad42f065f
X-ErrorCategory: NotSupported
X-IsRetriable: False
X-ConversionTimeInMs: 156.2542
X-FileDownloadTimeInMs: 453.1315
Cache-Control: private
Date: Wed, 03 Nov 2021 13:53:38 GMT
Server: Microsoft-IIS/10.0
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
Haven't tried it but just some ideas
Using OneDrive for business for both these options-
option 1:
- Get file content (of the docm file)
- Create file (using the above content). Give Test.docx in the file name
option 2:
- Copy file using Path
in the Destination File Path give Test.docx
If the docx comes out to be correct then you already have got it to converting to pdf.
Make sure to make backup copies before trying this as it may cause possible data loss.
Open the new docx file in the browser as well as on the desktop Word app to see if everything looks fine.
WarrenBelz
146,763
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
66,091
Most Valuable Professional