Solved

automate loading 100 jpg files into wordpad

Posted on 2001-09-13
4
330 Views
Last Modified: 2006-11-17
Hi,
This is the first question I have ever posted, so please bear with me.
I want to use Visual Basic to create a program to automate the process of loading 100 jpg files into Wordpad.  I have been to ms site and found info on automating the creation of word documents, but nothing for Wordpad (using Word is not an option).  Using example Word commands for wordpad did not work.
I created an Access db in VB which is used to categorize a few thousand jpg picture files.  The jpg files are not stored in the db itself, just their file names are stored.  The db is used to print out a catalog of jewelry.  User selects what to print, eg earrings, then all those jpg files categorized as earrings are filtered out of the db and automatically loaded into Wordpad to be viewed and printed.  All VB forms and code for the db stuff is completed, eg add picture, edit db, select what to print, etc.  I just need to add the code to automate the loading of the jpg files.  
Thank you for any help you can provide.
Scott

Additional info:
I originally envisioned adding a Wordpadctl control to a form and creating the catalog on the fly by adding the jpg files to it.  Using a richtextbox in some way is also an option if it isn't too kludgy.  What I really want is, after user selects what to print, the next thing they see is a Wordpad doc where they can print preview, edit, print, etc. the resulting document.
I have tried using richtext box with below code
RichTextBox1.TextRTF = "ABC Jewelry Catalog"
RichTextBox1.OLEObjects.Add , ,  _
    "C:\MyDocuments\catalogmaker\images\lrg1.jpg"
But the jpg always gets inserted at the beginning of the file (I don't know much about richtextbox and how to create a file with text and graphics).  I also have a picture box on the same form as above code.  This picture box has lrg1.jpg in it.  When I drag and drop lrg1.jpg to the richtextbox1 it is NOT inserted as an ole object (double clicking on it does not invoke ms photo editor).  I actually prefer it this way, eg not to be editable.
Sorry for the long winded response.  Bottom line: after user selects what to print, the next thing they see is a Wordpad doc where they can print preview, edit, print, etc. the resulting document. Thanks.
Scott
0
Comment
Question by:whetzels
4 Comments
 
LVL 28

Accepted Solution

by:
AzraSound earned 100 total points
ID: 6481115
Have you considered using the RichTextBox control?  You can then easily embed your images, and save it as an *.rtf file, thus, viewable by anyone who has WordPad.  (shelling the file would just launch the user's default application for handling *.rtf files)
0
 
LVL 22

Expert Comment

by:rspahitz
ID: 6481129
Alternately, this could be a relatively easy VB program to write and turn into an executable.
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 7208388
Hi whetzels,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Accept AzraSound's comment(s) as an answer.

whetzels, if you think your question was not answered at all or if you need help, just post a new comment here; Community Support will help you.  DO NOT accept this comment as an answer.

EXPERTS: If you disagree with that recommendation, please post an explanatory comment.
==========
DanRollins -- EE database cleanup volunteer
0
 
LVL 5

Expert Comment

by:Netminder
ID: 7241206
Per recommendation, force-accepted.

Netminder
CS Moderator
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question