Kindly_Kaela
01-31-2007, 02:29 PM
I made a VBA program that edits word documents depending on what the user inputs in the form. I've been working on this for several months. The code opens up a Word Template, makes the changes, and then saves it as a document.
All of a sudden today, TRACK CHANGES is turning on while the document goes through the final editting process. It's also putting that big block of empty space on the far right for comments.
Track Changes is NOT on when I open the template or WORD. Any idea what could be turning this on?
Is it something in this line?
Dim sFolder As String
Dim sUseTemplate As String
sFolder = "\\kora\departments\ProposalGenerator\Templates\ (file://\\kora\departments\ProposalGenerator\Templates\)"
Select Case ProdChoice
Case "ManagedHosting"
sUseTemplate = sFolder & "INVMHS.dot"
Case "ManagedDesktop"
sUseTemplate = sFolder & "INVMITS.dot"
Case "iHosting"
sUseTemplate = sFolder & "iHosting.dot"
Case "iLPAR"
sUseTemplate = sFolder & "iLPAR.dot"
Case "iRemote"
sUseTemplate = sFolder & "iRemote.dot"
Case "Implementation"
sUseTemplate = sFolder & "HostMigration.dot"
Case "Consulting"
sUseTemplate = sFolder & "INV_Consulting.dot"
Case "Development"
sUseTemplate = sFolder & "INV_Development.dot"
Case Else
MsgBox "No Product Specified"
End Select
Documents.Add Template:=sUseTemplate
ActiveDocument.SaveAs FileName:=CompInitials + "_" & _
Format(Now, "mmddyy") + "_Invision", FileFormat:=wdFormatDocument, _
LockComments:=False, Password:="", AddToRecentFiles:=True, _
WritePassword:="", ReadOnlyRecommended:=False, _
EmbedTrueTypeFonts:=False, SaveNativePictureFormat:=False, _
SaveFormsData:=False, SaveAsAOCELetter:=False
Edit by Lucas: Kaela, please use line breaks as some users in the Word forum do not have large monitors.
Thanks!
Kaela
:cloud9:
All of a sudden today, TRACK CHANGES is turning on while the document goes through the final editting process. It's also putting that big block of empty space on the far right for comments.
Track Changes is NOT on when I open the template or WORD. Any idea what could be turning this on?
Is it something in this line?
Dim sFolder As String
Dim sUseTemplate As String
sFolder = "\\kora\departments\ProposalGenerator\Templates\ (file://\\kora\departments\ProposalGenerator\Templates\)"
Select Case ProdChoice
Case "ManagedHosting"
sUseTemplate = sFolder & "INVMHS.dot"
Case "ManagedDesktop"
sUseTemplate = sFolder & "INVMITS.dot"
Case "iHosting"
sUseTemplate = sFolder & "iHosting.dot"
Case "iLPAR"
sUseTemplate = sFolder & "iLPAR.dot"
Case "iRemote"
sUseTemplate = sFolder & "iRemote.dot"
Case "Implementation"
sUseTemplate = sFolder & "HostMigration.dot"
Case "Consulting"
sUseTemplate = sFolder & "INV_Consulting.dot"
Case "Development"
sUseTemplate = sFolder & "INV_Development.dot"
Case Else
MsgBox "No Product Specified"
End Select
Documents.Add Template:=sUseTemplate
ActiveDocument.SaveAs FileName:=CompInitials + "_" & _
Format(Now, "mmddyy") + "_Invision", FileFormat:=wdFormatDocument, _
LockComments:=False, Password:="", AddToRecentFiles:=True, _
WritePassword:="", ReadOnlyRecommended:=False, _
EmbedTrueTypeFonts:=False, SaveNativePictureFormat:=False, _
SaveFormsData:=False, SaveAsAOCELetter:=False
Edit by Lucas: Kaela, please use line breaks as some users in the Word forum do not have large monitors.
Thanks!
Kaela
:cloud9: