473,769 Members | 3,232 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.Selecti on.Range.Inline Shapes.AddPictu re(@"C:\logo.bm p", 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 2825
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****@discuss ions.microsoft. com> wrote in message
news:D0******** *************** ***********@mic rosoft.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.Selecti on.Range.Inline Shapes.AddPictu re(@"C:\logo.bm p", 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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1732
by: Alfred | last post by:
Hi I am using following code to send email How can I use the .body or .htmlbody to insert a picture in the body of ms outlook. Outlook makes provision for sending pictures. If you are in the body you click on insert and the picture option is then available. Thus I suppose you can also do it via code Thanks for help Alfred
1
3825
by: Deb_OPPD | last post by:
I have Office 2003 Picture Manager. What OLECLass Property is associated to Picture Manager? What Class Property is associated to Picture Manager? Thanks! Deb
12
7479
by: BC | last post by:
Hello, We are creating an Office add-in. We are able to display the add-in successfully. However, we followed a sample program, and it displays a FaceID = 1044 (which is not the bitmap of the button we want to display). We want to display our own custom bitmap. How do we display our own custom bitmap instead of the bitmap associated with FaceID = 1044?
1
6273
by: GrantS | last post by:
I am needing to launch Microsoft Office 2003 Picture manager and display a selected image - from my Winforms C# application. The path to the files will be c:\Documents and Settings\USERNAME\My Documents Hopefully someone knows the exe or dll to be run and how this can be done in C#. I am needing:
6
1807
by: Patrick | last post by:
How do you insert a jpg picture from file on to an area of a dialog box I can do this using picturebox to insert a jpg picture onto a form, but the picturebox control is not available for a dialog box Thanks -- Patrick
2
1114
by: Tim Streater | last post by:
I couldn't understand why our Christmas letter, containing two photos and some text, should be 1.3Mbytes in size. I thought perhaps one of the pix had not been reduced in size before embedding in the Word doc. I decided to reproduce the letter (I also though that perhaps the letter, which my wife has edited stuff into and out of for the last ten years, was suffering from a bit of garbage non-collection a la Page maker), and did this: 1)...
10
3364
by: JonathanOrlev | last post by:
Hello everybody, I wrote this comment in another message of mine, but decided to post it again as a standalone message. I think that Microsoft's Office 2003 help system is horrible, probably the worst I ever seen. I almost cannot find anything I need, including things I
3
4665
by: abspring | last post by:
Hi I am a technology teacher/support person at an elementary school. I have created a database in which I need to insert a picture for each of our 650+ students. I have a table of student information with the student id as the primary key. Another table is the student photos table that has the student id and the imagename.bmp of the photo of that student and a OLE Object field for the picture image. All of the actual picture files are .bmp...
3
20830
by: JFKJr | last post by:
Hello everyone, I am trying to insert a picture in an excel spreadsheet cell using Access VBA. The following excel VBA code is working perfectly fine and I am able to insert picture in "A1" cell. But with the following Access VBA code, I am getting "Type Mismatch" error at line #13. Please kindly let me know how to solve this issue. Thanks a million in advance! Excel VBA: Sub InsertPic()
0
9590
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10223
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10000
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8879
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7413
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5310
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5448
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3571
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2815
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.