471,605 Members | 1,319 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,605 software developers and data experts.

Office Picture insert ? Example

Hi all,

I need an example to insert an Picture in an opend Word Document. My Code
doesn t work.

I tried :

object vk_missing = Type.Missing;
wordapp.Selection.Range.InlineShapes.AddPicture(@" C:\logo.bmp", ref
vk_missing, ref vk_missing, ref vk_missing);

The Document is successfully open, i can insert text's... the data ist saved
after doing this, but no effekt.

I use : VS2005, Office2003 and Win2k

How can I insert a picture from a file at position X,Y on every paper ? Can
someone give me an examplecode, please ?
Thx and Greets

Fabian
Jan 18 '06 #1
1 2733
that should be working for you if the bitmap is available and you have read
access to it. also have a look at the optional parameters to make sure you
are passing in correct input values.

--
Regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
The Microsoft Office Web Components Black Book with .NET
Now Available @ www.lulu.com/owc
Forth-coming VSTO.NET - Wrox/Wiley 2006
-------------------------------------------------------

"Fabian" <Fa****@discussions.microsoft.com> wrote in message
news:D0**********************************@microsof t.com...
Hi all,

I need an example to insert an Picture in an opend Word Document. My Code
doesn t work.

I tried :

object vk_missing = Type.Missing;
wordapp.Selection.Range.InlineShapes.AddPicture(@" C:\logo.bmp", ref
vk_missing, ref vk_missing, ref vk_missing);

The Document is successfully open, i can insert text's... the data ist saved after doing this, but no effekt.

I use : VS2005, Office2003 and Win2k

How can I insert a picture from a file at position X,Y on every paper ? Can someone give me an examplecode, please ?
Thx and Greets

Fabian

Jan 18 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by Patrick | last post: by
2 posts views Thread by Tim Streater | last post: by
1 post views Thread by XIAOLAOHU | last post: by
reply views Thread by leo001 | last post: by
reply views Thread by MichaelMortimer | last post: by
reply views Thread by CCCYYYY | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.