Solved

automate loading 100 jpg files into wordpad

Posted on 2001-09-13
4
331 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

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…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

733 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