•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the Visual Basic 4 / 5 / 6 section within the Software Development category of DaniWeb, a massive community of 402,053 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,448 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums
Views: 309 | Replies: 0
![]() |
•
•
Join Date: Sep 2007
Posts: 10
Reputation:
Rep Power: 1
Solved Threads: 0
Here is some old VBA code inside a Word 2003 document to open and then save a word document:
I ported the code to a word 2007 document, but now if I open a word 2007 doc the save code still saves it in the old format even if I specify a docx extension. What are the new parameters for FileFormat:= ..... now that MS is using the new open XML format. Can I save as either new/old format? Are there any other pitfalls to file I/O with the new MS open format?
Thanks ahead, for any help
Documents.Open FileName:=docFileName, ConfirmConversions:=True, _
ReadOnly:=False, AddToRecentFiles:=False, PasswordDocument:="", _
PasswordTemplate:="", Revert:=False, WritePasswordDocument:="", _
WritePasswordTemplate:="", Format:=wdOpenFormatAuto
'do stuff to the opened file here...
ActiveDocument.SaveAs _
FileName:=docFileName, _
FileFormat:=wdFormatDocument, _
LockComments:=False, _
Password:="", _
AddToRecentFiles:=True, _
WritePassword:="", _
ReadOnlyRecommended:=False, _
EmbedTrueTypeFonts:=False, _
SaveNativePictureFormat:=False, _
SaveFormsData:=False, _
SaveAsAOCELetter:=FalseI ported the code to a word 2007 document, but now if I open a word 2007 doc the save code still saves it in the old format even if I specify a docx extension. What are the new parameters for FileFormat:= ..... now that MS is using the new open XML format. Can I save as either new/old format? Are there any other pitfalls to file I/O with the new MS open format?
Thanks ahead, for any help
![]() |
•
•
•
•
•
•
•
•
DaniWeb Visual Basic 4 / 5 / 6 Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: a lot of similar code lines
- Next Thread: copy objects


Linear Mode