X
XmlAdoNewbie
Hi All,
I have created a template with word and VBA that takes all the word
docs in a specific folder and allows a user to open the selected
document for edit, when the user goes to edit the document it opens
the document into another template that i created which has a custom
toolbar attached to it and various VBA commands to control the events
on this toolbar. The problem i am having is when the user presses SAVE
on my custom toolbar, the document saves fine however it also saves
the toolbar and all i want is to save the text changes I DON'T want to
save the attached toolbar.. how do i do this? this is the code i have
for saving in my custom toolbar.
ActiveDocument.SaveAs FileName:=docletPath &
ActiveDocument.ActiveWindow.Caption, FileFormat:=wdFormatDocument
docletPath = "C:\Temp\doclet\"
the following is the code i use to open the word document that was
chosen for editing into the second template with the custom toolbar.
Set docApp = New Word.Application
With docApp
.Visible = True
.WindowState = wdWindowStateMaximize
End With
ActiveDocument.ActiveWindow =
docApp.Documents.Open("C:\_dev\CWBL\PensionDocumentBuilder\Retirement\tempDoclet.dot")
docApp.ActiveDocument.ActiveWindow.Selection.InsertFile
FileName:=docletPath & Me.txtSource.Text
docApp.CommandBars("Menu Bar").Enabled = False
docApp.ActiveDocument.ActiveWindow.Caption = Me.txtSource.Text
docApp.ActiveDocument.ActiveWindow.SetFocus
Thanks in advance for the help.
Erin
I have created a template with word and VBA that takes all the word
docs in a specific folder and allows a user to open the selected
document for edit, when the user goes to edit the document it opens
the document into another template that i created which has a custom
toolbar attached to it and various VBA commands to control the events
on this toolbar. The problem i am having is when the user presses SAVE
on my custom toolbar, the document saves fine however it also saves
the toolbar and all i want is to save the text changes I DON'T want to
save the attached toolbar.. how do i do this? this is the code i have
for saving in my custom toolbar.
ActiveDocument.SaveAs FileName:=docletPath &
ActiveDocument.ActiveWindow.Caption, FileFormat:=wdFormatDocument
docletPath = "C:\Temp\doclet\"
the following is the code i use to open the word document that was
chosen for editing into the second template with the custom toolbar.
Set docApp = New Word.Application
With docApp
.Visible = True
.WindowState = wdWindowStateMaximize
End With
ActiveDocument.ActiveWindow =
docApp.Documents.Open("C:\_dev\CWBL\PensionDocumentBuilder\Retirement\tempDoclet.dot")
docApp.ActiveDocument.ActiveWindow.Selection.InsertFile
FileName:=docletPath & Me.txtSource.Text
docApp.CommandBars("Menu Bar").Enabled = False
docApp.ActiveDocument.ActiveWindow.Caption = Me.txtSource.Text
docApp.ActiveDocument.ActiveWindow.SetFocus
Thanks in advance for the help.
Erin