473,387 Members | 1,530 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Newbie question...Image insertion with VB

1
From the looks of things on this site there are a bunch of questons and very few answers...but, hopefully this is an easy one to answer.

Before 2 days ago I don't even think I had looked at a visual basic script before. So, please bear with me. I'm a complete novice...but I do have a background in php scripting...so I'm not a total moron when it comes to this sort of thing.

Here's what I'm trying to do:
I want to build a script to insert images, inline, within Word and Outlook. This code is going to be primarily used to give emoticons back to the people in my office since we just switched from Eudora to Outlook and there are none. I've written code that works...but, it's alot of repetitious crap that I know can be simplified a LOT. Here's an example:

Sub EmotLargeAngry()
Selection.InlineShapes.AddPicture FileName:= _
"\\Server\IT Files\Macros\Emoticons\Images\Large\Angry.png", _
LinkToFile:=False, SaveWithDocument:=True
End Sub

I have that chunk of code 24 times for small, medium and large icons. I know I'm bound to be able to do some if statements in conjunction with a function that can squeeze this down to at least 1/3 if not less code. I'm just not familiar enough with VB to figure it out.

I need to be able to make individual buttons for each icon in a toolbar. So, somehow I'll need to be able to tell the script which button I pressed if the script were condensed to one function with if statements.

2 other little issues I'm having with this way of doing things...
1. I can only get this to work when Word 2003 is the email editor for Outlook. Some people in our office have Outlook 2003 and Word 2002, so Word is not an option for email editing in their case. How can I get this to work for Outlook independently?
2. When I insert the images in Outlook, they seem fuzzy as though they're being inserted large than their native size. How do I specify an image size in the script?


Thanks!!!
Matt Tyree
Sep 20 '06 #1
0 1248

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: gene.ellis | last post by:
Hello everyone. Put very simply, I need to have the ability to write to open a .txt file, write to it, and then close it. I know how to do this, but the part I am not sure how to accomplish is that...
20
by: Patrick Guio | last post by:
Dear all, I have some problem with insertion operator together with namespace. I have a header file foo.h containing declaration of classes, typedefs and insertion operators for the typedefs in...
7
by: needin4mation | last post by:
Hi, I have an Access 2002 - 2003 database. I am using Access 2003. Whenever I link an image all it shows is the filename. Not the image. Other versions of Access can link the image just fine. ...
24
by: Manuel | last post by:
Is it possible to embed an image, like a company logo in a CDOSYS generated message? If yes, I´ll apreciate some code sample. I´ve been able to format messages in html the way I like, but I...
11
by: Trent | last post by:
Running this I see that on first run, both bubble and selection sort have 9 sort counts while insertion sort has ZERO. With a sorted list, should this be ZERO for all? Also bsort and Ssort have...
1
underscore
by: underscore | last post by:
i use a php4 and apache2.0 b4 with mysql4 or lower in my php program. when i use xampp every i can't view my stored image already in html... here's my code. <?php $db_server ="Localhost";...
2
mafaisal
by: mafaisal | last post by:
Hello Experts I am Using VB.Net 2005 And Sql 2005 I Want to Insertion of Image in to DataBase And its Retrievel And Also Passing of Images to Crystal Reports I am searching For This B coz I...
7
by: idiolect | last post by:
Hi all - Sorry to plague you with another newbie question from a lurker. Hopefully, this will be simple. I have a list full of RGB pixel values read from an image. I want to test each RGB band...
7
by: Soumen | last post by:
I need to write code to copy unique elements in from a sequence container (say vector) to a set (or another sequence container will do). Is following code efficient? template <class T> void...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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,...

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.