Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
143044 | Mar 1,2019 04:08 PM UTC | Mar 8,2019 10:23 AM UTC | WinForms | 4 |
![]() |
Tags: DocIO |
//Loads existing Word document.
WordDocument document = new WordDocument("Template.docx");
WParagraph paragraph = document.LastParagraph;
//Get the picture in the Word document.
WPicture picture = paragraph.ChildEntities[1] as WPicture;
//Set width for picture.
picture.Width = 200;
//Set height scale based on the width scale factor.
picture.HeightScale = picture.WidthScale;
//Saves and closes the document instance
document.Save("Result.docx");
document.Close();
|
//Loads existing Word document.
WordDocument document = new WordDocument("Template.docx");
WParagraph paragraph = document.LastParagraph;
//Get the picture in the Word document.
WPicture picture = paragraph.ChildEntities[1] as WPicture;
//Set height for picture.
picture.Height = 300;
//Set width scale based on the height scale factor.
picture.WidthScale = picture.HeightScale;
//Saves and closes the document instance
document.Save("Result.docx");
document.Close(); |
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.