Macro to Save Word as PDF?

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Jamoatwork

Thread Starter
Joined
Jan 9, 2006
Messages
9
I work in an office with some "stupid" people so need to write a macro that will convert word (2003) .doc files to .pdf (Adobe Acrobat 6.0 Professional) when they go to save these important documents. Is this possible & how do i use the macro? I know it is possible to select it as a print option but they aren't able to ;)
Any help would be more then welcome.(y)
 

OBP

Joined
Mar 8, 2005
Messages
19,896
I do not think the people in your office are quite as "stupid" as you think. Have you tried manually saving a word document as a .pdf file?
I am not a Word person, but from memory of my office you have to "convert" a Word document with Adobe.
 

Jamoatwork

Thread Starter
Joined
Jan 9, 2006
Messages
9
Yes, I know how to "convert" the word .doc to a .pdf but i need it to do it automatically so anyone who uses the template has to save it as a .pdf. Is this possible? My boss seems to think so.
 

Jamoatwork

Thread Starter
Joined
Jan 9, 2006
Messages
9
Don't think my boss will agree to that but I can always ask. I take it there is no "macro"/ command option to solve my problem then. I knew my boss was fibbing when he told me it should be "easy".
 
Joined
Aug 17, 2003
Messages
17,584
Trying to get in between the Save option to interpose a third party application would be difficult for a Macro I believe. While it may be possible to have a VB routine place a button on the toolbar, that is really no different to the Print button you have now, if they cannot (will not) use that, I don't see any easy way of automating it.
 
Joined
Jul 1, 2005
Messages
8,546
I tend to agree with OBP in one sense -- if some people in your office are so stupid that they cannot follow "these files must be saved as PDF"-type instructions, I begin to wonder what the person who recruited them was thinking of. :confused:

That aside, "Working with events" at http://word.mvps.org/FAQs/index.htm (under Macros/VBA), including "Intercepting events like Save and Print", may give some pointers.

HTH,
Andy
 

Datalyss

Banned
Joined
Dec 8, 2005
Messages
381
Jamoatwork said:
Don't think my boss will agree...
I don't see why your boss wouldn't agree. Like I said, it's free. All you gotta do is type your document, and click the [PDF] button on the toolbar. It's that simple.
 
Joined
Aug 17, 2003
Messages
17,584
Datalyss said:
I don't see why your boss wouldn't agree. Like I said, it's free. All you gotta do is type your document, and click the [PDF] button on the toolbar. It's that simple.
Regretably there is not a 100% compatability with Microsoft Office and OpenOffice.

Its close, but no cigar (yet).

In my field, I could use it but the small formatting anomalies would create some annoying and time consuming difficulties. Particularly as all clients use MS Word, Access and Excel.
 

Datalyss

Banned
Joined
Dec 8, 2005
Messages
381
kiwiguy said:
Regretably there is not a 100% compatability with Microsoft Office and OpenOffice.

Its close, but no cigar (yet).

In my field, I could use it but the small formatting anomalies would create some annoying and time consuming difficulties. Particularly as all clients use MS Word, Access and Excel.
Like what? I'm just curious.

Anyway, importing existing docs might indeed have a few snags, but I would guess that typing new stuff, and exporting directly to PDF would be no trouble.
 
Joined
Aug 17, 2003
Messages
17,584
Odd things like image placements and formats are "close" but not always exactly as they were in the original Word document.

The spreadsheet has problems with the size of some analysis work as well, only Office 2003 can reliably handle a 200 MB sheet I have found. Even earlier Excel versions struggle.
But OO spreadsheetonly goes to 32,000 rows, which means its just not useable for 90% of my work.

As I drat a lot of regulatory documents in conjunction with others, we all need to use the same package as a base. There is no room for any inconsistencies or the cost quickly outweighs the "free" nature of OO.
 
Joined
Jul 1, 2005
Messages
8,546
kiwiguy said:
But OO spreadsheetonly goes to 32,000 rows, which means its just not useable for 90% of my work.
"Calc" in version 2 goes to 65536, if that helps. :)
 
Joined
Jun 11, 2004
Messages
161
I'm just going to toss in my two cents here given my experience with this.

I know that Adobe Standard Edition 7.0, when installed also installs a "printer" called "Adobe PDF" printer. Assuming you're working with Adobe 7, and assuming that Professional (the upgrade to Standard) would have this as well and that it is indeed installed (to find out go to Start | Settings | Printers & Faxes and it should be listed among your installed printers there).

Assuming all is well from here, here's how to record your macro:

1. Open Word 2003 and open any document you want.

2. Tools | Macro -> Record New Macro

3. At this point a window pops up. Click on the Toolbars button

4. Now you'll see a new window with two lists side by side. On the right list, it will say something like "Normal.NewMacro.Macro1". Click and drag that where you want it on the tool bar and it will become a button at that point. Also, make sure that on the bottom it states "Normal.dot" this is the default toolbar setup that every person using Word is given. If you use a custom toolbar template for your users, your boss should be able to provide that info.

5. Right click on the button and a menu will come down allowing you to change the name or the image (edit allows you to make your own and change offers premade choices)

6. From here be ready to start your macro as after this step all of your actions will be recorded:

7. Click on the close window and you'll see the scary face to show that your macro is now being recorded. Click on File | Print and change your printer to "Adobe PDF". Now click on OK.

8. You'll now be given a new window asking you what to name the file and where to save it (defaulted to My Documents). Rename the file and click on save and your Word document will be automatically converted, saved, and opened in Adobe Professional.

9. At this point go back to Word and stop the macro. Test it to make sure it goes over OK.


I hope that helps!

JFresh
 
Joined
Jun 24, 2004
Messages
114
JFresh is correct - if you have a full Acrobat you will have "Adobe PDF" or similar set up as a printer and it is relatively easy to write a macro to 'print' a document to PDF.

The difficult bit is dealing with the Acrobat Dialog which presents (step 8 in JFresh's post) asking for the name (and location) of the pdf file you want to create - this is part of Acrobat and beyond the reach of a macro in Word - and nothing will record from it. I believe, in Acrobat 7, there is a setting in Acrobat to tell it always to take the default instead of prompting for the name - I'm not sure about earlier releases but will do some digging to see if I can find out.
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Staff online

Top