macronoob7 Posted May 19, 2009 Report Share Posted May 19, 2009 I am having trouble with a macro I have built. I want it to paste in a picture inbetween text types in 2 different spots. The problem is no matter what I have tried the pictures always end up being whatever I put into the second paste. My setup is as follows: Restore All Variables Text type Clipboard Graphic Copy - linked to pic1 Clipboard Paste Text Type Clipboard Graphic Copy - linked to pic2 Clipboard Paste Text Type Restore All Variables All my text comes out perfectly but the pictures always come out with whatever picture I put into the second link (or whatever is the last link, I tried with 3 pics just to test it and it got all 3) I would think that this would work no problem, but for whatever reason it is acting as if it doesn't paste any of the graphics until the macro has finished running and it will paste whatever was the last picture copied into all the paste spots. It is almost as if there is a problem with the way macro express is spitting out the information. I have tried several variations of the setup, including using the clipboard start copy and end copy commands, as well as trying to break up the macro into 2 separate macros and have the first macro begin to run the second one right after the first picture was pasted. These worked no differently than the original setup. For example: Macro 1: Restore All Variables Text type Clipboard Graphic Copy - linked to pic1 Clipboard Paste Text Type Restore All Variables Macro Run: Macro 2 Macro 2: Restore All Variables Text type Clipboard Graphic Copy - linked to pic2 Clipboard Paste Text Type Restore All Variables However, if I ran macro 1 and then immediately manually ran macro 2 instead of having it autorun by using macro 1 it worked just fine. Can anyone help me?? Quote Link to comment Share on other sites More sharing options...
stan Posted May 20, 2009 Report Share Posted May 20, 2009 Windows requires some time to process clipboard functions. I would suggest placing a small delay between the Clipboard Copy and Clipboard Paste commands. A quarter second delay should be sufficient. This will allow Windows time to process the clipboard. Depending on how long it takes to type the text after the first paste, you may also need to add a delay before the second Clipboard Copy. Quote Link to comment Share on other sites More sharing options...
macronoob7 Posted May 20, 2009 Author Report Share Posted May 20, 2009 Thanks stan, I will try that out and see what happens. Quote Link to comment Share on other sites More sharing options...
macronoob7 Posted May 20, 2009 Author Report Share Posted May 20, 2009 Delay worked perfectly, thanks again for the help. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.