Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
Kerry Kerry is offline
external usenet poster
 
Posts: 45
Default Macro doesn't work

I have a macro which saves my Word doc as a pdf based on words within the
document itself. Sometimes I get an error and the macro stops on the
following line:

ActiveDocument.ExportAsFixedFormat OutputFileName:=sFileName, _
ExportFormat:=wdExportFormatPDF, OpenAfterExport:=False,
OptimizeFor:= _
wdExportOptimizeForPrint, Range:=wdExportAllDocument, From:=1, To:=1, _
Item:=wdExportDocumentContent, IncludeDocProps:=False, KeepIRM:=True, _
CreateBookmarks:=wdExportCreateNoBookmarks, DocStructureTags:=True, _
BitmapMissingFonts:=True, UseISO19005_1:=False

sFileName is a string

If I close out of all my Office apps (Outlook, Word 2007) then reopen Word
and invoke the macro right away, it will work beautifully. I don't know if
it has to do with the other apps or not, but if I restart everything fresh,
it works again. Is the problem with the macro or something else?

 
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro does not work Purplejopeg Microsoft Word Help 1 April 2nd 08 12:32 PM
Macro won't work... silas[_2_] New Users 5 January 8th 08 07:26 PM
Getting a Macro to Work Right Joe McGuire Microsoft Word Help 4 January 31st 07 07:25 AM
Macro doesn't work Anna Microsoft Word Help 9 October 17th 05 10:25 PM
Macro that won't work Danker Schaareman Microsoft Word Help 1 September 30th 05 04:42 AM


All times are GMT +1. The time now is 07:03 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"