Word file into PDF

Word file into PDF

martinhoos
Advocate Advocate
693 Views
4 Replies
Message 1 of 5

Word file into PDF

martinhoos
Advocate
Advocate

Hello Forum,

i have a code that created a word file, save it and quits word.

My question: Is it possible to create additionally a PDF file?

 

'Save the Word file with a new name and close the document
wordDoc.SaveAs (ThisDoc.PathAndFileName(False) & ".docx")
wordDoc.Close()
wordDoc=Nothing

 

If i change ".docx" into ".pdf" there will created a defective PDF File. What do i wrong?

 

Very best regards

Martin

0 Likes
Accepted solutions (1)
694 Views
4 Replies
Replies (4)
Message 2 of 5

philip1009
Advisor
Advisor

Is this Inventor related?  If you're looking to save a drawing as a PDF there's a much easier way than going through Microsoft Word, there's plenty of PDF export code examples on this forum for you to use.

0 Likes
Message 3 of 5

bradeneuropeArthur
Mentor
Mentor
Accepted solution

  Public Sub pdf()

ThisDocument.SaveAs2 "C:\Temp\MyDoc.pdf", 17
  End Sub
 

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

0 Likes
Message 4 of 5

martinhoos
Advocate
Advocate

... thanks ...

0 Likes
Message 5 of 5

martinhoos
Advocate
Advocate

Hello Brandeneurope,

thank you for your reply - that runs! So i can create out of Inventor a word file with data from Inventor and also save this as pdf.

thanks a lot

Regards Martin

0 Likes