Macro to Cut/Paste Images from Office Document Imaging

Alright, I am an accountant who has picked some VBA over the last 5
months to stay busy at work.  I've spent 10-15 hours on this macro and
can't figure it out.

Here's the deal: I want to take a massive .tif file (1-3k pages) and
cut/paste pages into new .tif's(or .mbi's).  I finally figured out the
search function (copy/paste from MSDN), but can't get it to cut and
paste.  Here is the macro as I have it now.  I would explain it, but I
don't really understand why it works.



Sub loopimages()

  Dim miDoc As MODI.Document
  Dim miSearch As MODI.MiDocSearch
  Dim miTextSel As MODI.IMiSelectableItem
  Dim strSearchInfo As String
  Dim miImage As MODI.Image

  Set miDoc = New MODI.Document
  miDoc.Create "C:\scan.tif"

  miDoc.OCR
  Set miSearch = New MODI.MiDocSearch
  miSearch.Initialize miDoc, "disbursement requisition", 0, 0, False,
False
  miSearch.Search Nothing, miTextSel

  If miTextSel.Words.Count <> 0 Then
     MsgBox "success"
  Else
    MsgBox "failure"
  End If
  MsgBox strSearchInfo, vbInformation + vbOKOnly, _
    "Search Information"

  Set miTextSel = Nothing
  Set miSearch = Nothing
  Set miDoc = Nothing
End Sub



Right now it is searching for "disbursement requisition" on the first
page of c:\scan.tif.

Where I have the "success" msgbox, I want to cut & paste to a new .tif
file.  I've tried using the copytoclipboard and (ugh) Sendkeys, but
can't get anything to work.  Can anyone point me in the right
direction?

Thanks,

Jed

0
jwaarnold (1)
9/28/2005 10:06:17 PM
excel 39879 articles. 2 followers. Follow

0 Replies
380 Views

Similar Articles

[PageSpeed] 32

Reply:

Similar Artilces:

Right click , drag and drop and cut , copy paste facilities
Why can't we have drag and drop , cut and paste facilities in any of the record forms Pretty limiting eh? Just chalk it up as one of many CRM shortcomings. Sometimes you can right click, sometimes you can't. Just get in the habit of using Ctrl + C and Ctrl + V. -- Brandon Smith IT Director Presentations Direct - Specialized Office Equipment & Supplies http://www.presentationsdirect.com "Nitin" <Nitin@discussions.microsoft.com> wrote in message news:2223FB31-B10E-4EA7-87C0-ED483F5F6E23@microsoft.com... > Why can't we have drag and drop , cut and past...

Linked graphics into a Publisher 2000 document
I have a 400KB document (withgout graphics). I insert two JPEG images each around 200KB into the document. I figure the resulting document should be around 700KB. Result? An 11MB file. I delete the images (document is now 400KB) and instead insert the images using the "Link to File" option. Graphics Manager confirms that the images are linbked into the file. The size should not be more than 500KB. Result? An 11MB file. Question is how can I insert images into a Publisher 2000 documentr without the file blowing up? And why does it blow up? Regards, Richard. Richard wrot...

Remove macro is greyed out
I want to remove a sort macro that I made which is in a workbook that I made. When I go Tools|Macro|Macros I see the macro but the delete button is greyed. How can I remove the macro? Beemer Sometimes, the project is protected by the developer. But if you created the macro, then you know if you protected that project. Did you? Do you get prompted for a password when you try to access the project (inside the VBE)? Beemer wrote: > > I want to remove a sort macro that I made which is in a workbook that I > made. When I go Tools|Macro|Macros I see the macro but the delete ...

Creating a Microsoft Words document from an existing Excel spreads
Hi all, I need your kind guidance on how to create a new microsoft words document using an existing excel spreadsheet? At present, I have an excel spreadsheet, say "data.xls" containing data for example 6 fields such as COMPANY NAME, DATE, ITEM1, ITEM2, ITEM,3 & QUOTATION TOTAL. Under these 6 fields are some records of my customers. COMPANY NM DATE ITEM1 ITEM2 ITEM3 QUOTATION TTL ---------------- ------- -------- ------- -------- ------------------- ABC Limited 3 Apr xxxxx xxxxx ...

Macros for worksheet copy & paste?
I have 6 different excel files. How can I combine all 6 of them in one single excel file under individual worksheets (E.g. Worksheet1 for File1, worksheet2 for File2 ....etc)? I do not wish to copy & paste it manually. Can I use a macro to take care of it? If so, where can I find further info on how to go about it? THANKS!! Assuming (1) this is a one-time need, and (2) your workbooks have only one sheet each, this would probably be faster done by hand: 1) With all the files open choose one of the files to be the receiving file. 2) Select the sheet in the subsequent books, one at...

Incorrect Office Updates in Microsoft Update
Hello I recently did clean installs of XP and Win7 on 2 different PCs. Each PC was loaded with Office 2007. When I ran Microsoft Update after the Office installs, it shows I needed Office 2007 SP1, not SP2. I manually downloaded and installed Office 2007 SP2 and then checked Windows Updates for any needed patches. It still showed I needed Office 2007 SP1...even though I just installed SP2. Does anyone know how to 1) have Office SP2 show up as a needed update instead of SP1, and 2) how to configure Windows Update to show that no SP is needed after SP2 is installed? th...

Office 2007 trial is very slow. Is this because it's a trial
I just started using the trial version of Office 2007. It takes forever for it to open on my computer but Office 2003 opens just fine. Is this just because it's a trial or is it naturally slow because of the additional features? It's likely due to the expanded feature set and increased hardware requirement over Office 2003. rtappan wrote: > I just started using the trial version of Office 2007. It takes forever for > it to open on my computer but Office 2003 opens just fine. Is this just > because it's a trial or is it naturally slow because of the ad...

automatic office updates
Is there a way to configure a PC to receive Office Updates automatically like Windows Update? Thanks. Jeff Via MicrosoftUpdate as apposed to windowsupdate, and then configuring how you update. eg automatic or download and notify "J Miller" <jmiller@*nospam*pcsdps.org> wrote in message news:456db17c$0$81355$ae4e5890@news.nationwide.net... > Is there a way to configure a PC to receive Office Updates automatically > like Windows Update? > > Thanks. > > > Jeff > > Yes. Microsoft updates does this. What version of Office do you use? -- Diane...

Out-of-office twin replies
I've seen some posts here with regards to OOO replies generating two replies, one of which is blank. This is happening on at least two different versions of Outlook and Exchange 5.5/2000 so it appears to be a server side problem. Does anyone have a solution to this? ...

Out of office replies and exchange 2003
I am a bit new to exchange 2003. Can anyone point me in the right direction for out of office replies, meaning, can I set certain addresses to not send them to, like email lists or discussion groups? if so how? thanks Out of office replies to the internet are disabled by default. You can allow them to specific domains under Global Settings. On Wed, 29 Sep 2004 08:50:44 -0700, "tester" <tester@testthis.net> wrote: >I am a bit new to exchange 2003. Can anyone point me in the right direction >for out of office replies, meaning, can I set certain addresses to not ...

how to improve shared mailbox access from branch office
Hi, Our organization has consolidated all mailboxes to centralize location. A team of shared services specialist who often work on the shared mailbox encounter performance issues when trying to access the shared mailbox due to the shared mailbox are being accessed over the WAN in online mode. The shared mailbox is attached as a secondary mailbox to their personal mailbox. Personal mailbox does not have this issue due to all are configure to use Exchange cache mode. We have proposed to user Terminal server nearer to the centralize location and Outlook Web Access but the team...

office 2003 w/ windows 7 requires reacceptance ot T&C's each time
office 2003 w/ windows 7 requires reacceptance of T&C's each time i open work or excell or any office program. How do I get rid of this? Boot into Safe mode in Windows 7,open any Office app and then accept the terms -- Peter Please Reply to Newsgroup for the benefit of others Requests for assistance by email can not and will not be acknowledged. "mouser830" <mouser830@discussions.microsoft.com> wrote in message news:E7B7602D-F5D8-4559-98EF-A2CCC1E2D6FD@microsoft.com... > office 2003 w/ windows 7 requires reacceptance of T&C's each time i op...

SECOND TRY< WHY NO ANSWERS ??? WINXP PRO,OFFICE 2003PRO not working write. WHY ?
> I bought a Windows XP upgrade disk from a friend and it > installs ok, but has this dumb key on it that starts out > with "XXXXX-640-blah-blah-blah" (why does it use X's ?????) Whats the matter with it, > is the installer or the software no good ?????? I paid > good money for this crappe and get this and it cleaned out > all my email and Kazaa. > Next MS mess, how come Outlook 2003 (has almost the same > bozo key number) does not send my messages to the forums > and I have to use this way ? Is it not working too ? Like > do they check a...

Office 2007 SP2
Has anyone else lost the little check box which is usually found next to each task in the task list in Outlook today? I'm assuming it's a bug? C. "Carmen Gauvin-O'Donnell" <seegod1@cogeco.ca> wrote in message news:ejYOAzcyJHA.4632@TK2MSFTNGP02.phx.gbl... > Has anyone else lost the little check box which is usually found next to > each task in the task list in Outlook today? I'm assuming it's a bug? > Nope - still there... -- Asking a question? Please tell us the version of the application you are asking about, your OS, Service Pack level...

Help on Macro or Formula
Hi, i hope someone can help me. i need to create a formula that sits in a cell and looks for data. ( obvioiusly ). however, the formula needs to be in place even though the file from ehere the data comes from might not be there yet. ( i have to create a book that when a new file is created, the links are already in place ). i think it could work with an IF type formula for ( if B2="",""). here is my information. Cell description: A2 = Job no. B2 = Client Name D2 = Actual Spend on project Register!D2 = Job Description Register!H2 = Quoted Amount my path is S:\Clients\...

Excel 2000 macro security Level
Hi! I am running an ASP.NET application which ideally opens an Exce spreadsheet with a macro included in it. When I try opening spreadsheet without a macro, everything works fine, but with macros, i hangs on the opening command. I tried to go to Excel 2000 and go t Tools->Macros->Security Level->Low but it still hangs when I try t open the macro spreadsheet. All works fine with the spreadsheet no containing macros, so it really is a question of macro security. But put it to low, so I don't understand how it is still not opening!! An help would be greatly appreciated! Thanks and...

What exactly is office, excel, and encarta?
Office is a collection of programs including Excel, Word, Outlook, PowerPoint, and Access. Excel is a spreadsheet program that is included in the Office collection. Encarta is an encyclopedia, dictionary, and thesaurus. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Samantha" <Samantha@discussions.microsoft.com> wrote in message news:11F2ABDE-D337-44AC-9A93-EDB079460BD1@microsoft.com... > ...

08 Mac Office activation problems
Version: 2008 Operating System: Mac OS X 10.5 (Leopard) Just found an article posted by michellec and I am faced with exactly the same problem - on 'activation' of the product, none of the 3 product keys seem to be correct, hence activation is unsuccessful!! Have received some help emails (and thanks Diana yours had the microsoft help number that has been good, despite the fact they can't help me and tell me I must get in touch with Digital River) but seems that what I need is another product key, and now that I'm asking for that since about 10 days, I don't get any reply ...

can't update office xp
I can't download the latest updates for office xp. I get a "hotfix" error. I also can't have microsoft check my computer for installed updates. it just tells me that my computer is unable to communicate with microsoft. >-----Original Message----- >I can't download the latest updates for office xp. I get >a "hotfix" error. I also can't have microsoft check my >computer for installed updates. it just tells me that my >computer is unable to communicate with microsoft. >. >guess no one has any reply to this, should I reload outloo...

Running an Excel Macro from an Access Command Button
Hi , Can anyone help me with this, I am trying to run an excel macro from an access command button. I want the macro to Bold the Headings on a excel spreadsheet. The code runs without any errors but the macro doesnt seem to work, I think I have got the line ExcelApp.ExecuteExcel4Macro "RUN(""PERSONAL.XLS!BoldHead"")" wrong The code: Private Sub cmdRunMac_Click() Dim ExcelApp As Excel.Application Dim ExcelBook As Excel.Workbook Set ExcelApp = Excel.Application ExcelApp.Visible = True Set ExcelBook = ExcelApp.Workbooks.Open("C:\Documents and Settings\...

New Named Range Created Each Time Data Imported into Excel via Macro
I have noticed that each time I import data into an Excel spreadsheet via a macro, a new named range (for the same range) is created. This does not pose a problem, but after a while, I'll have a huge number of named ranges that will never be used. Why does Excel name the range and how can I stop this? I noticed in the recorded macro, there was a line .Name = "drd_5". I commented this out to see what would happen, but it just renamed the range "ExternalData_5". The next one was "ExternalData_6", etc. Thanks, Carroll Rinehart You could refresh with differen...

Office 2010 Buying Question Assistance Needed
I've been looking through the MS Office 2010 web site to try to determine what my new small company would require, but I can't find the information I need. We for sure would need Office Pro Plus, but other than that I'm not sure. We want to run it on our own server. We will initially have 3-5 people using it and perhaps more later on. Would we need to purchase site licensing? Unfortunately, our programmers are MS haters (I'm not) and I can't get any assistance from them on this, but I have power of the pen. I would appreciate any assistance I can get. Th...

Move pages from document to document?
This is a multi-part message in MIME format. ------=_NextPart_000_0397_01C7D5D9.22350CB0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi, I am relatively new to this software. I can't seem to find how to move a = page from one document to another. Any help appreciated. Shmuel ------=_NextPart_000_0397_01C7D5D9.22350CB0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <MET...

How do I break a large word document into smaller components?
I have a very large Word document (over 40 MB) that I update several times a year. I would like to break it into smaller components so that only the affected component would have to be backed up online. However, I still wish to maintain the ability to create a table of contents and index for the whole document. Is this possible and if so, what is the process to do it. I am using MS Office 2010 beta running MS Windows 7 Home Premium on a 64 bit Dell desktop. Hi RoadRoy, You can simply make multiple copies and delete whatever you don't want from each copy. For the mul...

Contact looses Post Office Box field when synchronized to Outlook
When I sync contacts from CRM 4.0 to Outlook, the Post Office Box field from the contact gets empty. Anyone has the same issue? ...