-
WSlorraine
AskWoody LoungerAssume you have found the answer. As a help to others reading this post, to suppress Save as dialog, open pdf995.ini and add the line Output File=SAMEASDOCUMENT.
-
WSlorraine
AskWoody LoungerJanuary 14, 2008 at 10:50 pm in reply to: Print Word Doc To PDF Stripping Blank Page (Word 2003) #1092524Thanks Hans – quite correct. I just realised this morning that I had to add some code to get the extensibility object as we now have Document Management Software, and this module did not have it. Once this was added, the original code worked a treat. Thanks so much again for your help, sorry to waste your time.
-
WSlorraine
AskWoody LoungerJanuary 14, 2008 at 3:58 am in reply to: Print Word Doc To PDF Stripping Blank Page (Word 2003) #1092419Thanks William – Yes it WORKED formatted as hidden text. Why did I not think of that one !! You wouldn’t believe the time I’ve spent on this, not to mention the “googling”. Seems the problem isn’t restricted to trying to print to pdf995 driver either. Code execution just stops after Application.PrintOut, no matter what ranges, page numbers etc are set.
Anyways, thanks Hans, Andrew and William – invaluable site for me
-
WSlorraine
AskWoody LoungerJanuary 14, 2008 at 12:33 am in reply to: Print Word Doc To PDF Stripping Blank Page (Word 2003) #1092407Correct Hans. Problem with full version is licensing, as many users need to access this project. Having said I’m getting the full version loaded – will post back
-
WSlorraine
AskWoody LoungerJanuary 13, 2008 at 11:59 pm in reply to: Print Word Doc To PDF Stripping Blank Page (Word 2003) #1092402No go … anything after Application.PrintOut is ignored. I’m still trying go strip the last section break prior to pdf, however headers/footer get jumbled. Any other ideas out there ?
-
WSlorraine
AskWoody LoungerJanuary 13, 2008 at 10:44 pm in reply to: Print Word Doc To PDF Stripping Blank Page (Word 2003) #1092395Thanks Andrew – will give it a try but don’t hold out much hope, as I’ve tried actually printing the current page only and that’s a no go. Have also deleted the section prior to pdf, which works, although bit of mucking around if penultimate page has a different header / footer etc.
As to why we have the section break – our template system is object oriented, and where a document contains multiple pages , i.e, a letter (over one page, and a form, or such) the document variables are populated with print codes and name codes for each. We then have print buttons which allow user to print various copies of each/all pages based on these document variables.
Will give your suggestion a go, crossing fingers, although I gotta say, it’s as if all code following Application.PrintOut is ignored by pdf995 driver.
-
WSlorraine
AskWoody LoungerJanuary 11, 2008 at 4:01 am in reply to: Print Word Doc To PDF Stripping Blank Page (Word 2003) #1092048Thanks Hans. Seems that pdf995 totally ignores anything that follows Application.PrintOut, as I even tried just printing the current page – again, no go. The whole document went to pdf. Hope someone may chime in here with a workaround.
-
WSlorraine
AskWoody LoungerJanuary 10, 2008 at 4:11 am in reply to: Print Word Doc To PDF Stripping Blank Page (Word 2003) #1091867Sorry Hans – it won’t actually strip that last blank page from the document, so the pdf still includes a blank page. Where the document contains 4 pages I only want to “pdf” 3 pages, as the last page is always blank, due to section break at the end. I can’t remove that section break as it contains formatting info etc. I thought it would be an easy thing to just set intRage equal to number of pages in the document minus 1 but it isn’t working. I can manually print the pdf driver, selecting pages 1-3 and the blank page is stripped, but with this code it remains.
-
WSlorraine
AskWoody LoungerAfter a few weeks (months !) of frustration with having to turn the ruler back on when it goes missing I feel I may have solved this problem and hope to help out anyone in the Lounge still “suffering”. Having exhausted Word settings etc., browsing posts here regarding feedback with animation etc., I’ve just discovered (on using another machine here) what caused my problem.
I noticed that when viewing a document in Print Preview on another machine, the ruler was still displaying (in Print Preview) whereas on my machine it wasn’t. After playing around a bit, discovered that my ruler would remain in PageLayout view, after using Print Preview, however, if I then opened a new blank document the ruler would then “disappear”. Seems that View Ruler needs to be ticked in the Print Preview view as well as PageLayout/Normal view. No more disappearing ruler.
-
WSlorraine
AskWoody LoungerHi Sharon
Place a bookmark “obmkNumber” at the place the invoice number is to be inserted. Create an AutoNew module in your template with the following code
Dim iUsageCount As Integer
Dim sUsageCount As String
iUsageCount = Val(System.PrivateProfileString(“c:IncrementNumber.txt”, sFileName, “Number”))
iUsageCount = iUsageCount + 1
sUsageCount = CStr(iUsageCount)
Selection.GoTo What:=wdGoToBookmark, Name:=”obmkNumber”
Selection.TypeText sUsageCount
System.PrivateProfileString(“c:IncrementNumber.txt”, sFileName, “Number”) = sUsageCountNo need to create the txt file as it will be automatic. That’s if you want to start numbering from 1 – if you need to change the “start” number, just edit c:IncrementNumber.txt and insert your start number. This template will then have to be run on the same machine to keep the numbering consistent. Hope this helps.
Cheers
Lorraine -
WSlorraine
AskWoody LoungerPosted too soon – just found the answer …. easy as
.SearchSubFolders = True
Thanks again.
-
WSlorraine
AskWoody LoungerThat’s it – very obvious I would say, but not a statement I knew about – Thanks so much William. Now another little snag – How do I also cycle through the documents in any sub-folders as well ?
-
WSlorraine
AskWoody LoungerOOoops – jumped the gun with my reply – however, I’m sure someone will help out. Sorry I had my upside-down glasses on.
-
WSlorraine
AskWoody LoungerThanks Hans. That code works in background which is far neater. I didn’t receive the pdf I wanted – instead an error page printed “Your application needs to be configured for printing to a PostScript Language Level 2 printer”. My work colleague said he’ll take a look in the PostScript Printer options tomorrow and then it should work a treat.
-
WSlorraine
AskWoody LoungerThanks for that Jefferson … I’ve found the post from Kevin in VBA, subject “More PDF fun” … so I’m off to give it a go.
![]() |
Patch reliability is unclear, but widespread attacks make patching prudent. Go ahead and patch, but watch out for potential problems. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |

Plus Membership
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Get Plus!
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Search Newsletters
Search Forums
View the Forum
Search for Topics
Recent Topics
-
USB webcam / microphone missing after KB5050009 update
by
WSlloydkuhnle
15 minutes ago -
TeleMessage, a modified Signal clone used by US government has been hacked
by
Alex5723
53 minutes ago -
The story of Windows Longhorn
by
Cybertooth
1 hour, 23 minutes ago -
Red x next to folder on OneDrive iPadOS
by
dmt_3904
2 hours, 51 minutes ago -
Are manuals extinct?
by
Susan Bradley
4 minutes ago -
Canonical ditching Sudo for Rust Sudo -rs starting with Ubuntu
by
Alex5723
11 hours, 59 minutes ago -
Network Issue
by
Casey H
4 hours, 3 minutes ago -
Fedora Linux is now an official WSL distro
by
Alex5723
23 hours, 59 minutes ago -
May 2025 Office non-Security updates
by
PKCano
1 day ago -
Windows 10 filehistory including onedrive folder
by
Steve Bondy
1 day, 2 hours ago -
pages print on restart (Win 11 23H2)
by
cyraxote
3 hours, 13 minutes ago -
Windows 11 Insider Preview build 26200.5581 released to DEV
by
joep517
1 day, 4 hours ago -
Windows 11 Insider Preview build 26120.3950 (24H2) released to BETA
by
joep517
1 day, 4 hours ago -
Proton to drop prices after ruling against “Apple tax”
by
Cybertooth
1 day, 11 hours ago -
24H2 Installer – don’t see Option for non destructive install
by
JP
4 hours, 18 minutes ago -
Asking Again here (New User and Fast change only backups)
by
thymej
1 day, 23 hours ago -
How much I spent on the Mac mini
by
Will Fastie
22 hours, 41 minutes ago -
How to get rid of Copilot in Microsoft 365
by
Lance Whitney
27 minutes ago -
Spring cleanup — 2025
by
Deanna McElveen
2 days, 5 hours ago -
Setting up Windows 11
by
Susan Bradley
1 day ago -
VLC Introduces Cutting-Edge AI Subtitling and Translation Capabilities
by
Alex5723
2 days ago -
Powershell version?
by
CWBillow
2 days, 1 hour ago -
SendTom Toys
by
CWBillow
12 hours, 20 minutes ago -
Add shortcut to taskbar?
by
CWBillow
2 days, 5 hours ago -
Sycophancy in GPT-4o: What happened
by
Alex5723
2 days, 21 hours ago -
How can I install Skype on Windows 7?
by
Help
2 days, 20 hours ago -
Logitech MK850 Keyboard issues
by
Rush2112
2 days, 3 hours ago -
We live in a simulation
by
Alex5723
3 days, 11 hours ago -
Netplwiz not working
by
RetiredGeek
2 days, 22 hours ago -
Windows 11 24H2 is broadly available
by
Alex5723
4 days ago
Recent blog posts
Key Links
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.