Solved

automate loading 100 jpg files into wordpad

Posted on 2001-09-13
4
332 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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 …
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…

691 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