Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #31  
Old 10-24-2012, 04:52 AM
longee longee is offline Numbering Receipt Books Windows XP Numbering Receipt Books Office 2007
Novice
Numbering Receipt Books
 
Join Date: Oct 2012
Posts: 26
longee is on a distinguished road
Default

Paul
Got it going in 2007. found the 'option' button on a small box.
M.R.L.
Reply With Quote
  #32  
Old 10-24-2012, 06:04 AM
longee longee is offline Numbering Receipt Books Windows XP Numbering Receipt Books Office 2007
Novice
Numbering Receipt Books
 
Join Date: Oct 2012
Posts: 26
longee is on a distinguished road
Default

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.
Reply With Quote
  #33  
Old 10-24-2012, 07:00 AM
macropod's Avatar
macropod macropod is offline Numbering Receipt Books Windows 7 64bit Numbering Receipt Books Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

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]
Reply With Quote
  #34  
Old 10-24-2012, 08:01 AM
longee longee is offline Numbering Receipt Books Windows XP Numbering Receipt Books Office 2007
Novice
Numbering Receipt Books
 
Join Date: Oct 2012
Posts: 26
longee is on a distinguished road
Default

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.
Reply With Quote
  #35  
Old 10-24-2012, 05:38 PM
macropod's Avatar
macropod macropod is offline Numbering Receipt Books Windows 7 64bit Numbering Receipt Books Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Apologies - inadequate testing.

The attached update has a revised macro and field coding. You should be able to have receipt #s in the millions.
Attached Files
File Type: doc Receipts.doc (131.0 KB, 23 views)
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #36  
Old 10-25-2012, 03:18 AM
longee longee is offline Numbering Receipt Books Windows XP Numbering Receipt Books Office 2007
Novice
Numbering Receipt Books
 
Join Date: Oct 2012
Posts: 26
longee is on a distinguished road
Default

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.
Reply With Quote
  #37  
Old 10-25-2012, 03:20 AM
longee longee is offline Numbering Receipt Books Windows XP Numbering Receipt Books Office 2007
Novice
Numbering Receipt Books
 
Join Date: Oct 2012
Posts: 26
longee is on a distinguished road
Default

Paul
Ref. earlier msg I should have said that when I press reset is when the disabled msg appears
M.R.L.
Reply With Quote
  #38  
Old 10-25-2012, 03:58 AM
macropod's Avatar
macropod macropod is offline Numbering Receipt Books Windows 7 64bit Numbering Receipt Books Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

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]
Reply With Quote
  #39  
Old 10-25-2012, 04:04 AM
longee longee is offline Numbering Receipt Books Windows XP Numbering Receipt Books Office 2007
Novice
Numbering Receipt Books
 
Join Date: Oct 2012
Posts: 26
longee is on a distinguished road
Default

Paul
I saved the doc. re-opened it and all is working except the numbers are still haywire
M.R.L.
Reply With Quote
  #40  
Old 10-25-2012, 05:31 AM
macropod's Avatar
macropod macropod is offline Numbering Receipt Books Windows 7 64bit Numbering Receipt Books Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

That doesn't exactly describe the problem with any symptoms I might be able to diagnose ...
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #41  
Old 10-25-2012, 08:00 AM
longee longee is offline Numbering Receipt Books Windows XP Numbering Receipt Books Office 2007
Novice
Numbering Receipt Books
 
Join Date: Oct 2012
Posts: 26
longee is on a distinguished road
Default

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
Reply With Quote
  #42  
Old 10-25-2012, 10:37 PM
macropod's Avatar
macropod macropod is offline Numbering Receipt Books Windows 7 64bit Numbering Receipt Books Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

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]
Reply With Quote
  #43  
Old 10-26-2012, 03:58 AM
longee longee is offline Numbering Receipt Books Windows XP Numbering Receipt Books Office 2007
Novice
Numbering Receipt Books
 
Join Date: Oct 2012
Posts: 26
longee is on a distinguished road
Default

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.
Reply With Quote
  #44  
Old 10-26-2012, 07:11 PM
macropod's Avatar
macropod macropod is offline Numbering Receipt Books Windows 7 64bit Numbering Receipt Books Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

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]
Reply With Quote
Reply



Similar Threads
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

Other Forums: Access Forums

All times are GMT -7. The time now is 10:08 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft