Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Pasting image to word: image size issues

Pasting image to word: image size issues

Scheduled Pinned Locked Moved C#
comquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • _ Offline
    _ Offline
    _iobuf
    wrote on last edited by
    #1

    I have a word document and I want to paste an image into a cell. Both the cell and the image can be of any size. I am using Microsoft.Office.Interop.Word to do this. After getting the right cell and copying the image to the clipboard, when I call cell.Range.Paste(); the image gets pasted into the document, but it doesn't get auto resized to fit the cell dimensions. If I select the image with my mouse and then press ctrl + v, the image is re-pasted and auto resized. Is there a way to paste the image from code and have it resize? Thx

    C 1 Reply Last reply
    0
    • _ _iobuf

      I have a word document and I want to paste an image into a cell. Both the cell and the image can be of any size. I am using Microsoft.Office.Interop.Word to do this. After getting the right cell and copying the image to the clipboard, when I call cell.Range.Paste(); the image gets pasted into the document, but it doesn't get auto resized to fit the cell dimensions. If I select the image with my mouse and then press ctrl + v, the image is re-pasted and auto resized. Is there a way to paste the image from code and have it resize? Thx

      C Offline
      C Offline
      csetopper_bhanu
      wrote on last edited by
      #2

      how to insert an image in word file through C# 2008.... please send me the code to insert an image in a word file through C# 2008

      csetopper_bhanu

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups