+ Reply to Thread
Results 1 to 3 of 3

Converting excel data in Word with formats

  1. #1
    Registered User
    Join Date
    05-03-2011
    Location
    Geneva, Switzerland
    MS-Off Ver
    Excel 2003
    Posts
    2

    Lightbulb Converting excel data in Word with formats

    Hi everyone,

    I am relatively new to VBA. I am trying to create a macro in excel such that starting from an excel file creates a word file. I get stuck because, after copying the data from excel to word, I cannot include in the macro the "convert to text" command.
    Can you please help? How do I use Word macros within a Macro launched from Excel?
    Thank you

    Please Login or Register  to view this content.
    Last edited by pike; 05-03-2011 at 05:05 AM. Reason: add code tags for newbie pm rules

  2. #2
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: Converting excel data in Word with formats

    This suffices.
    Adapt the file-fullname and the range you want to be put into the Worddocument

    Please Login or Register  to view this content.



  3. #3
    Registered User
    Join Date
    05-03-2011
    Location
    Geneva, Switzerland
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: Converting excel data in Word with formats

    Hi

    #
    Thanks for this tip, However, I still struggle to make it work.
    Using the code you have posted, I get the "object required" alert message.

    I think that the issue is that I am trying to use Word macro syntax in an excel macro file.
    Also, I need to select the tab from which I am coping the file from, that why in my code I have the commands "basebook.Activate and baseSheet.Select"

    Why does the "recorded macro" from word does not work here?

    Thanks
    R.

+ Reply to 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