![]() |
#31
|
|||
|
|||
![]()
Paul
Got it going in 2007. found the 'option' button on a small box. M.R.L. |
#32
|
|||
|
|||
![]()
Paul
I've got there. The only thing I would now ask, can the Nos. be moved. Also can the macro be used in other publications. E.G.another receipt book but this time it is A4 landscape divided in 2 (A5) Sorry to be a pain M.R.L. |
#33
|
||||
|
||||
![]()
Yes, the Nos. can be moved. If you press Alt-F9, you can see the full field code, simply cut & paste the entire construction to wherever you want then press Alt-F9 again when you're done.
As for using with a document with two sets per page, you'd need a different version of the macro and only two of the fields.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#34
|
|||
|
|||
![]()
Paul I'm so sorry to keep coming back to you but,when re-number the macro which I want to start at 12481 and end at 12640 (160), the top r comes up o.k. but the other 3 have gone haywire Top r ends with 15680 bottom l 18840 & bottom r 22000. I tried starting at 1 - 160 & that seemed to work. Is there a limit how high one can go?
M.R.L. |
#35
|
||||
|
||||
![]()
Apologies - inadequate testing.
The attached update has a revised macro and field coding. You should be able to have receipt #s in the millions.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#36
|
|||
|
|||
![]()
Paul
Still having trouble, SORRY. It's coming up with the macros disbled msg. again. I've gone into 'macro security' and checked the 'disable all macros with notification' as you said in an earlier msg. Nothing happens M.R.L. |
#37
|
|||
|
|||
![]()
Paul
Ref. earlier msg I should have said that when I press reset is when the disabled msg appears M.R.L. |
#38
|
||||
|
||||
![]()
The macro security settings don't change on a per-document basis. Once set, you shouldn't need to change them again.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#39
|
|||
|
|||
![]()
Paul
I saved the doc. re-opened it and all is working except the numbers are still haywire M.R.L. |
#40
|
||||
|
||||
![]()
That doesn't exactly describe the problem with any symptoms I might be able to diagnose ...
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#41
|
|||
|
|||
![]()
Paul
Having opened the document in word 2007 I click on 'this document.receiptprint' , and filled the start/finish nos. 12481 - 12690. It immediately goes to print which I ran for the full set. It started at 12492 thro to 12500 then went back to 12481 and printed the rest in sequence leaving out the 492-500. Also when I changed the nos. the on screen view is 12961 on all four sheets and this sheet is printed before rest of them. I hope I'm making sense to you. Even if I save it still comes up 12961, which is the start of the next sequence. Once again many alopogies M.R.L. Last edited by longee; 10-25-2012 at 11:31 AM. Reason: missed something out |
#42
|
||||
|
||||
![]()
So, the issue is that your PC is printing the receipts out of order? It's not the macro that's doing that, but your PC. Nevertheless, a slight change to the macro will fix it.
Get ready for a tiny bit of programming. Open the document. Press Alt-F11. You should now be in the vb editor, with the macro code showing. In the Sub named 'ReceiptPrint', find the line: .Printout Change this to: .PrintOut Background:=False That's all there is to it. Press Alt-F11 again to return to the document. The '12961' is a non-issue. The macro is coded so that it terminates with the last printed No. +1, as the default starting No. for the next sequence. It does that to make life easier. The Screen display doesn't update while the code is executing, so whatever was displayed when you started remains displayed until it's finished. I wrote it that way for speed. With the changes to the printout command, above, some of that performance will have been lost. If you want to see the numbers updating, go back into the vb editor and delete the lines: Application.ScreenUpdating = False and Application.ScreenUpdating = True Then, after the line: .Fields.Update insert: Application.ScreenRefresh
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#43
|
|||
|
|||
![]()
Paul
Thank you very much for what you've done for me. It will make things so much quicker and easier. Can you recommend anything online or a book that I could study to get an idea of how macros are 'made'. Perhaps I should point out that I'm a retired 70 yr.old mariner. Once again many many thanks M.R.L. |
#44
|
||||
|
||||
![]()
There are numerous on-line tutorials for recording & writing macros. Utlimately, it's a bit like learning another language, and there's nothing like writing them to develop your skills. Almost vof of my vba ability has been learnt from studying the code other have posted on forums like this one and by writing/adapting such code to help people like yourself. Like you, I'm retired and have no personal need for such things in my day-to-day life.
A book that might help you is: The Secret Life of Word: A Professional Writer's Guide to Microsoft Word Automation, by Robert Delwood I provided some of the content for that book, and did a fair bit of the technical review before it was published.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Delay sending the read receipt | Rita | Outlook | 1 | 10-04-2012 08:46 PM |
New Idea for Delivery Receipt | BrazzellMarketing | Outlook | 0 | 01-13-2011 03:44 PM |
Read Receipt not working | Dawn1231a | Outlook | 0 | 08-05-2010 07:40 AM |
Read Receipt | lfreng | Outlook | 0 | 04-11-2006 10:37 AM |
Self Help Books for Macros? | KRB | Excel | 0 | 11-22-2005 01:33 PM |