Closed Thread
Results 1 to 7 of 7

Saving Notepad from VBA

  1. #1
    Registered User
    Join Date
    02-04-2009
    Location
    Rio de Janeiro
    MS-Off Ver
    Excel 2007
    Posts
    3

    Saving Notepad from VBA

    Hello.

    I am triyng to paste a range in a notepad and then save this notepad as an xml file

    So far I have:

    Please Login or Register  to view this content.
    How can I now save this notepad as an XML file (for example: test.xml)

    Thanks
    Last edited by Leith Ross; 02-04-2009 at 11:04 PM.

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Saving Notepad from VBA

    Hello ricardodickstein,

    Welcome to the Forum!
    To make your posts easier to read, copy, and edit please wrap your code. I did it for you this time. Here is how you can do it next time.

    How to wrap your Code
    Select all the code text in your post.
    In the Message window Toolbar click the # icon.
    Or you can do this manually by placing the tag [code]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/code] at the end.

    As a member, You have agreed to follow the forum posting rules. Please take so time to familiarize yourself with the Do's and Don'ts here in the Forum, just click on the link below...

    Forum Rules
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Registered User
    Join Date
    02-04-2009
    Location
    Rio de Janeiro
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Saving Notepad from VBA

    OK, Leith.

    Thanks for the tip

  4. #4
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Saving Notepad from VBA

    See Chip Pearson's code tips
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  5. #5
    Forum Expert Kenneth Hobson's Avatar
    Join Date
    02-05-2007
    Location
    Tecumseh, OK
    MS-Off Ver
    Office 365, Win10Home
    Posts
    2,573

    Re: Saving Notepad from VBA

    Not sure what you are trying to accomplish. You can create an xml, which is just a text file using text file writing methods as Roy linked. However, some other parts are created for you when you SaveAs an xml file in Excel or MSWord.

    So, why not just record a macro to open a new workbook, insert your data, and then do a SaveAs?

    Always avoid Sendkeys when you can.

  6. #6
    Registered User
    Join Date
    11-05-2009
    Location
    missouri
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Saving Notepad from VBA

    While XML is basically text, I have the problem of needing it saved as a .xml file for my interactive charts to read the data. Also when trying to save as an xml in excel it says I need to set up xml mapping.

  7. #7
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Saving Notepad from VBA

    Your post does not comply with Rule 2 of our Forum RULES. Don't post a question in the thread of another member -- start your own thread. If you feel it's particularly relevant, provide a link to the other thread.

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1