Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 05-31-2014, 02:31 PM
JamesHusband JamesHusband is offline Automatically generate PDF from saved word doc Windows 7 32bit Automatically generate PDF from saved word doc Office 2007
Novice
Automatically generate PDF from saved word doc
 
Join Date: May 2014
Posts: 3
JamesHusband is on a distinguished road
Question Automatically generate PDF from saved word doc

Hi,



I manage the website for a hotel and restaurant.

To display the menu online I use Dropbox and then on the website link to the "menu.pdf" file within.


The menu changes every night so currently the hotel staff have to:

1. Edit the menu word document for the evenings menu
2. Print said menu for the in house menus
3. Overwrite the "menu.pdf" file in the Dropbox folder by saving from word


This is obviously time consuming and should the staff forget step 3 (which is often the case) the menu on the website will not be updated.

I was wondering if it is possible instead to:

1. Edit the menu word document for the evenings menu
2. Print
3. Save file
4. And then Automatically overwrite the "menu.pdf" in the dropbox folder

Is this a possibility?
Any help would be greatly appreciated
Reply With Quote
  #2  
Old 06-02-2014, 06:37 AM
OTPM OTPM is offline Automatically generate PDF from saved word doc Windows 7 32bit Automatically generate PDF from saved word doc Office 2010 32bit
Expert
 
Join Date: Apr 2011
Location: West Midlands
Posts: 981
OTPM is on a distinguished road
Default

Hi
First save your document as a macro enabled document.
Next click on the Developer tab followed by Visual Basic.
Next on the left hand side click on ThisDocument and past the following code:

Code:
Private Sub Document_Close()
 ActiveDocument.Save
    ActiveDocument.ExportAsFixedFormat OutputFileName:= _
        "D:\Users\anking\Desktop\Menu Test to save as PDF.pdf", ExportFormat:= _
        wdExportFormatPDF, OpenAfterExport:=Fasle, OptimizeFor:= _
        wdExportOptimizeForPrint, Range:=wdExportAllDocument, From:=1, To:=1, _
        Item:=wdExportDocumentContent, IncludeDocProps:=True, KeepIRM:=True, _
        CreateBookmarks:=wdExportCreateNoBookmarks, DocStructureTags:=True, _
        BitmapMissingFonts:=True, UseISO19005_1:=False
    ShowVisualBasicEditor = True
End Sub
Change the document path to suit your needs. A pdf version of the filw will then be created automatically when you close the document.
Hope this helps.
Tony
Reply With Quote
  #3  
Old 06-02-2014, 10:10 AM
JamesHusband JamesHusband is offline Automatically generate PDF from saved word doc Windows 7 32bit Automatically generate PDF from saved word doc Office 2007
Novice
Automatically generate PDF from saved word doc
 
Join Date: May 2014
Posts: 3
JamesHusband is on a distinguished road
Smile Thank you so much!!

Perfect! Cannot thank you enough!
Reply With Quote
  #4  
Old 06-07-2014, 08:30 AM
JamesHusband JamesHusband is offline Automatically generate PDF from saved word doc Windows 7 32bit Automatically generate PDF from saved word doc Office 2007
Novice
Automatically generate PDF from saved word doc
 
Join Date: May 2014
Posts: 3
JamesHusband is on a distinguished road
Default

Expanding on this.....

Is there anyway to use a macro to automatically upload the generated .pdf file via FTP?

This would be an even better solution as removes the need for Dropbox...
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Need to uninstall, then install Office 2007. Is data in Outlook automatically saved? jgenn Office 1 03-10-2014 02:14 PM
Video not working when saved as .ppt But does when saved as .pptx patientxwolf PowerPoint 5 01-24-2014 02:16 PM
Word 2013 macro to generate last day of each week (Saturday) CrabApple Word 1 11-08-2013 02:40 PM
Using Word/OL 2010 to generate personalized email messages rickr44318 Word 0 06-26-2013 06:34 AM
How to identify whether Word 2007 was used to create a document saved as Word 2003 noviceatwork Word 0 03-08-2012 06:40 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 05:33 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