Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #15  
Old 05-09-2014, 05:52 AM
steveneashcraft steveneashcraft is offline How to suppress saveas dialog from VB6 Windows 7 64bit How to suppress saveas dialog from VB6 Office 2010 64bit
Novice
How to suppress saveas dialog from VB6
 
Join Date: May 2014
Posts: 8
steveneashcraft is on a distinguished road
Default

Quote:
Originally Posted by macropod View Post
I created the file in Word 2010 and used SaveAs to save it as an RTF file. I didn't then go an examine the contents, as I expected the output to conform to the RTF specifications. I am not confused as to formats vs file extensions. I suppose I should have twigged to something being amiss when it allowed me to save the file with the macro. Attached is another file - this time a true RTF. The macro that's in the other one works fine with this file too.
I think I understand why we are not communicating very well. I thought you, as an expert in Word, knew that doing this operation with Word was the same as doing it from within VB6.
Apparently it isn't
Try this code snippet using cscript and then we will be comparing apples to apples. I have used both Windows 7 (32 bit) , Windows 2008 R2, and XP to demonstrate that the Save dialog always comes up with Word 2010 or Word 1013.

I realize this is not strictly a Word question but it does have to do with the Word object.


Dim WW
Dim FileName
Dim SaveFormat
FileName = "C:\tmp\sample.rtf"
SaveFormat = 0
Set WW = CreateObject("Word.Application")
WW.Visible = True
WW.Documents.Open FileName
call WW.activedocument.SaveAs (FileName, SaveFormat)
WW.activedocument.Close False


where c:\tmp\sample.rtf is internally an rtf file.

The last sample.rtf file you sent me was internally an rtf file.
Thanks again.
Reply With Quote
 

Tags
save as, suppress



Similar Threads
Thread Thread Starter Forum Replies Last Post
Disabling Word's Save and SaveAs commands Catty Word VBA 6 03-19-2014 03:21 AM
How to suppress saveas dialog from VB6 Saveas error handling jillapass Word VBA 7 03-30-2012 03:24 PM
How to suppress saveas dialog from VB6 saveAs ChDir _ tinfanide Excel Programming 4 11-05-2011 01:40 AM
Suppress Dialog Box crutch024 Word 0 08-17-2010 09:52 AM
How to suppress saveas dialog from VB6 Suppress "do you want to save?" dialog on close rnstewart Excel 2 12-28-2005 04:30 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 01:51 PM.


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