<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic OLE - Save method in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/ole-save-method/m-p/5328415#M1227930</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    i want to save a word file into my desktop, I am able to open a word document, feed data using OLE and when I am trying to save using the below code &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  CALL METHOD OF wordobj 'SaveAs' EXPORTING
    #1 = 'c:\11\information1.doc'
    #2 = '0'
    #3 = 'False'
    #4 = ''
    #5 = 'True'
    #6 = ''
    #7 = 'False'
    #8 = 'False'
    #9 = 'False'
    #10 = 'False'
    #11 = 'False'.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The corresponding VB code is as below&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
Sub saveonly()
'
' saveonly Macro
' Macro recorded 3/12/2009 by Krishna
'
    ChangeFileOpenDirectory "C:\Documents and Settings\krishna\Desktop\"
    ActiveDocument.SaveAs FileName:="112111.doc", FileFormat:=wdFormatDocument _
        , LockComments:=False, Password:="", AddToRecentFiles:=True, _
        WritePassword:="", ReadOnlyRecommended:=False, EmbedTrueTypeFonts:=False, _
         SaveNativePictureFormat:=False, SaveFormsData:=False, SaveAsAOCELetter:= _
        False
End Sub
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know what is wrong in this code.. I have searched the SDN forum, but I could not find a solution .. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Krishnan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 12 Mar 2009 11:17:35 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-03-12T11:17:35Z</dc:date>
    <item>
      <title>OLE - Save method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/ole-save-method/m-p/5328415#M1227930</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    i want to save a word file into my desktop, I am able to open a word document, feed data using OLE and when I am trying to save using the below code &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  CALL METHOD OF wordobj 'SaveAs' EXPORTING
    #1 = 'c:\11\information1.doc'
    #2 = '0'
    #3 = 'False'
    #4 = ''
    #5 = 'True'
    #6 = ''
    #7 = 'False'
    #8 = 'False'
    #9 = 'False'
    #10 = 'False'
    #11 = 'False'.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The corresponding VB code is as below&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
Sub saveonly()
'
' saveonly Macro
' Macro recorded 3/12/2009 by Krishna
'
    ChangeFileOpenDirectory "C:\Documents and Settings\krishna\Desktop\"
    ActiveDocument.SaveAs FileName:="112111.doc", FileFormat:=wdFormatDocument _
        , LockComments:=False, Password:="", AddToRecentFiles:=True, _
        WritePassword:="", ReadOnlyRecommended:=False, EmbedTrueTypeFonts:=False, _
         SaveNativePictureFormat:=False, SaveFormsData:=False, SaveAsAOCELetter:= _
        False
End Sub
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know what is wrong in this code.. I have searched the SDN forum, but I could not find a solution .. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Krishnan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Mar 2009 11:17:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/ole-save-method/m-p/5328415#M1227930</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-12T11:17:35Z</dc:date>
    </item>
    <item>
      <title>Re: OLE - Save method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/ole-save-method/m-p/5328416#M1227931</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Krishnan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You must use 0 for false and 1 for true (no literals) instead of 'False' and 'True'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That should resolve your problem, I think.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Mar 2009 17:43:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/ole-save-method/m-p/5328416#M1227931</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-13T17:43:36Z</dc:date>
    </item>
    <item>
      <title>Re: OLE - Save method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/ole-save-method/m-p/5328417#M1227932</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks, I did resolve this problem. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The actual statemetn is as below &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
 CALL METHOD OF wordobj 'FileSaveAs' EXPORTING #1 = p_file.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;p_file is file path.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Mar 2009 02:15:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/ole-save-method/m-p/5328417#M1227932</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-16T02:15:10Z</dc:date>
    </item>
  </channel>
</rss>

