Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 03-22-2015, 08:48 AM
Ahmed AbuZekry Ahmed AbuZekry is offline VBS saveas API behaviour is different from Menu saveas Windows XP VBS saveas API behaviour is different from Menu saveas Office 2010 32bit
Novice
VBS saveas API behaviour is different from Menu saveas
 
Join Date: Mar 2015
Posts: 2
Ahmed AbuZekry is on a distinguished road
Default VBS saveas API behaviour is different from Menu saveas


I tried to write a simple VBS to open a .doc file and save it as .docx, and did the same from Menu items in Word. File size and XML contents in both cases are different. So it is a bug in saveas API or is there something missing ? I tried something like:

objDoc.SaveAs objFSO.BuildPath( outputDirectory, objFSO.GetBaseName( objFile ) & ".docx" ), wdFormatDocument

Is there anything missing in the saveas method to avoid this issue? Is there any way to make both files exactly match?
Reply With Quote
  #2  
Old 03-22-2015, 10:59 PM
Guessed's Avatar
Guessed Guessed is offline VBS saveas API behaviour is different from Menu saveas Windows 7 32bit VBS saveas API behaviour is different from Menu saveas Office 2010 32bit
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,932
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

What elements of the xml files differ?

The metadata may well be different in your testing eg save date/time so it is important to determine whether the differences are actually important.
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
  #3  
Old 03-23-2015, 02:14 AM
Ahmed AbuZekry Ahmed AbuZekry is offline VBS saveas API behaviour is different from Menu saveas Windows XP VBS saveas API behaviour is different from Menu saveas Office 2010 32bit
Novice
VBS saveas API behaviour is different from Menu saveas
 
Join Date: Mar 2015
Posts: 2
Ahmed AbuZekry is on a distinguished road
Default

The difference is not metadata. There are a lot of missing runs in the xml converted from the VBS and some bookmarks. Surprisingly, when I open both files using Word there is no difference. But I care only about the xml, I need them to match.
Reply With Quote
Reply

Tags
doc2docx, saveas, vbs

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
VBS saveas API behaviour is different from Menu saveas SaveAs docm file from template ptmuldoon Word VBA 7 03-09-2015 05:38 PM
wordapp.ActiveDocument.SaveAs Not Working KSReynolds Mail Merge 1 07-18-2014 04:03 PM
VBS saveas API behaviour is different from Menu saveas How to suppress saveas dialog from VB6 steveneashcraft Word VBA 15 05-09-2014 07:01 AM
VBS saveas API behaviour is different from Menu saveas Saveas error handling jillapass Word VBA 7 03-30-2012 03:24 PM
VBS saveas API behaviour is different from Menu saveas saveAs ChDir _ tinfanide Excel Programming 4 11-05-2011 01:40 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 04:12 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft