Share via

Using VSTO in VB.net getting error message when saving as PDF. It used to work fine and the code is working fine on other development machines.

Andrew Innes 51 Reputation points
2022-01-07T15:06:52.56+00:00

Below is the image of the error message I am getting and the code that makes the call. message is related to system.runtime.interopservices. when trying to save as a PDF.

The rest of VSTO seems to be running fine. Microsoft Word document is being manipulated fine. Just the save as PDF is screwing up.

The same code with no changes is working fine on other development machines in the office, so it must be related to the specific machine. It is also working fine at client site.

I tried reinstalling the VSTO and that did nothing to fix the problem. The difference with this development machine and the others is it has Visual Studio 2022 installed on it. We had much trouble with version 2022 and went back to using 2019. We did not test the VSTO issue with VS 2022.

So how do we fix this problem.

Thank you in advance for your assistance.

Happy New Year!

163233-image.png

Microsoft 365 and Office | Development | Other
0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.