Hi Rick,
Here I write some code for you.
Imports Microsoft.Office.Interop
Module Module1
Sub Main()
Dim wdApp As New Word.Application
wdApp.Visible = True
wdApp.Documents.Add()
wdApp.ActiveDocument.Range.InlineShapes.AddPicture ("c:\dafen.jpg")
wdApp.ActiveDocument.SaveAs("c:\test.dot",
Word.WdSaveFormat.wdFormatTemplate)
End Sub
End Module
Did this does the job for you, if you have any concern on this issue please
post here.
Regards,
Peter Huang
Microsoft Online Partner Support
Get Secure!
www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
--------------------
From: "Rick" <un*****@unknown.com>
Newsgroups: microsoft.public.dotnet.languages.vb
Subject: Inserting a PictureBox picture into Word document
Lines: 9
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <Vgztb.3196$Ue4.302@fed1read01>
Date: Sat, 15 Nov 2003 16:11:45 -0800
NNTP-Posting-Host: 68.104.98.141
X-Complaints-To: ab***@cox.net
X-Trace: fed1read01 1068941493 68.104.98.141 (Sat, 15 Nov 2003 19:11:33
EST)NNTP-Posting-Date: Sat, 15 Nov 2003 19:11:33 EST
Organization: Cox Communications
Path:
cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!news-out.cwix.com!newsfeed.cwix.co
m!nntp1.roc.gblx.net!nntp.gblx.net!nntp.gblx.net!p riapus.visi.com!news-out.v
isi.com!green.readfreenews.net!news.readfreenews.n et!cox.net!news-xfer.cox.n
et!p01!fed1read01.POSTED!not-for-mailXref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.vb:157125
X-Tomcat-NG: microsoft.public.dotnet.languages.vb
How do I go about doing this? Basically I have a field where the user
inputs a doctors name, a field where the user inputs the doctors bio, and
then a picturebox where they select an image from their hard disk. I need
all this info to be saved into a Word template, but I'm not sure how to do
it.
I program in C++, but I have had some experience with VB.