?
Solved

automate loading 100 jpg files into wordpad

Posted on 2001-09-13
4
Medium Priority
?
334 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 400 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…
Suggested Courses
Course of the Month11 days, 10 hours left to enroll

752 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