HELP on minor(?) editing to a macro?I have a macro to convert word into pdf(shown below),but it accepts my track changes n prints the track changes red text as black text. Can help me so that it doesnt do this when it converts to pdf?

Louis L 1 Reputation point

I have a macro to convert word docs into adobe pdf's(shown below), however when it converts the files it accepts my track changes and then prints the track changes red text as black text. Can anybody help me with modifying my macro so that it will be able to print track changes when it converts to pdf?

Meaning that I would like to have the track changes showing when it is converted to pdf.

Question: If you are able to modify this, will it affect the macro when I have a word doc i want to convert to pdf but it doesn't have any track changes? I just want the macro to show track changes in the pdf where there are track changes but still be able to convert word files that dont have track changes to pdf.


The word conversion to pdf macro:

Sub batch_pdf()
' batch_pdf Macro
Dim strDocPath As String
Dim strTemplateB As String
Dim strCurDoc As String
Dim docCurDoc As Document

' set document folder path and template strings
strDocPath = "P:\Murphy\Macros\Batch PDF Workshop\"
' strTemplateB = "C:\temp_templates\templates\batch_template.dotm"

' get first doc - only time need to provide file spec
strCurDoc = Dir(strDocPath & "*.doc?")

' ready to loop (for as long as file found)
Do While strCurDoc <> ""
    ' open file
    Set docCurDoc = Documents.Open(FileName:=strDocPath & strCurDoc)
    ' change the template
    ' docCurDoc.AttachedTemplate = strTemplateB
     Dim wrdDoc As Word.Document
Set wrdDoc = Application.ActiveDocument

Dim CurrentFolder As String
Dim FileName As String
Dim myPath As String
'Store Information About Word File
myPath = ActiveDocument.FullName
CurrentFolder = ActiveDocument.Path & "\"
FileName = Mid(myPath, InStrRev(myPath, "\") + 1, _
InStrRev(myPath, ".") - InStrRev(myPath, "\") - 1)

ActiveDocument.ExportAsFixedFormat _
 OutputFileName:=CurrentFolder & FileName & ".pdf", _

' save and close
docCurDoc.Close wdSaveChanges
' get next file name
strCurDoc = Dir
MsgBox "Finished"
End Sub

0 comments No comments
{count} votes