G
Guest
I am having trouble sizing a picture after inserting it into Word using
VB.NET. I have a Windows form that allows a user to select several pictures
from file. They can then export those pictures to a Word document. I can
control the size of the picture on my form using a picture box, but how can I
size it in Word, using VB.NET, after I have inserted it? I want to force the
picture to a certain size. I tried using a template, but the picture was not
forced to the size of the image on the template. Below is what I have so far:
Dim oWord As Word.Application
Dim oDoc As Word.Document
'Start Word
oWord = New Word.Application()
oDoc = oWord.Documents.Add
oWord.Visible = True
oDoc.InlineShapes.AddPicture(fileName:=pic1, _
LinkToFile:=False, SaveWithDocument:=True)
This creates a word document with the picture in it, but the picture is much
bigger than I want. I want to be able to give the picture a specific size in
Word. Any ideas?
VB.NET. I have a Windows form that allows a user to select several pictures
from file. They can then export those pictures to a Word document. I can
control the size of the picture on my form using a picture box, but how can I
size it in Word, using VB.NET, after I have inserted it? I want to force the
picture to a certain size. I tried using a template, but the picture was not
forced to the size of the image on the template. Below is what I have so far:
Dim oWord As Word.Application
Dim oDoc As Word.Document
'Start Word
oWord = New Word.Application()
oDoc = oWord.Documents.Add
oWord.Visible = True
oDoc.InlineShapes.AddPicture(fileName:=pic1, _
LinkToFile:=False, SaveWithDocument:=True)
This creates a word document with the picture in it, but the picture is much
bigger than I want. I want to be able to give the picture a specific size in
Word. Any ideas?