• Pasting as graphic instead of text (Access 2002 (10.267.2625))

    Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » Pasting as graphic instead of text (Access 2002 (10.267.2625))

    Author
    Topic
    #422349

    I am switching from Access 97 to Access XP (2002).

    I have been using Excel 97 to chart the results of my query.
    Upon running the query I am selecting all the records and copying them to the clipboard.
    I then instruct the user to “Place the cursor in cell A1 and paste (Ctl+V)”
    This pastes the results of the query into Excel and the chart is updated.

    Now that I am using Access 2002 and Excel 2002 the paste is done as a graphic, not text.

    How can I get the query results into Excel 2002 as text?

    Private Sub Command42_Click()
    ‘————————————————————
    ‘ Opens query and pastes information into a spreadsheet for charting.
    ‘————————————————————
    On Error GoTo PctScrapWeekly_Err

    ‘ Open query
    DoCmd.OpenQuery “qxtbPctScrapWeeklyDexIn”, acNormal, acReadOnly
    ‘ Select all records
    DoCmd.RunCommand acCmdSelectAllRecords
    ‘ Copy Records
    DoCmd.RunCommand acCmdCopy
    ‘ Close Query
    DoCmd.Close acQuery, “qxtbPctScrapWeeklyDexIn”
    ‘ Instructions to paste the clipboard into the Excel sheet.
    Beep
    MsgBox “Place the cursor in cell A1 and paste (Ctl+V)”, vbInformation, “”
    ‘ Open Excel file DexInWeekly.xls
    Call Shell(“C:Program FilesMicrosoft OfficeOfficeExcel.exe “”O:Growtth2PctScrapWeeklyPctScrapDexIn.xls”””, 1)

    PctScrapWeekly_Exit:
    Exit Sub

    PctScrapWeekly_Err:
    MsgBox “There is not any data for this date range.”
    DoCmd.Close acQuery, “qxtbPctScrapWeeklyDexIn”
    Resume PctScrapWeekly_Exit

    End Sub

    Viewing 0 reply threads
    Author
    Replies
    • #962956

      Access 2002/Excel 2002 shouldn’t act differently in this respect. I’ve been using Office XP for over 2.5 years now and never had the problem you describe.
      What happens if you (or the end user) selects Edit | Paste Special… in Excel? What options are offered, and what is the default option? (For me, the default is Excel 8.0)

      • #962966

        Trying Edit, Paste Special, I have only one option displayed, Bitmap.

        This occurs in both Excel 97 and 2002.

        Maybe there is a setting somewhere that I can change?

        • #962976

          No idea. What happens if you
          – Paste into Excel.
          – Delete the resulting picture.
          – Paste again.

          • #963195

            Pasting, deleting, and pasting again results in a graphic being pasted.

            The office clipboard contains the graphic.

            Is there a way that I can paste the Windows clipboard?

            • #963209

              I don’t think there is a way to bypass the Office clipboard. I’m stumped, I have no idea why this is happening.

              What happens if you paste into a Word document?

            • #964279

              Sorry for not responding quicker. My browser was not working well. I kept getting kicked out when I posted a response and the response time was very poor with timeouts occurring frequently.

              Pasting into Word 97 or 2002 was done as a graphic.

              I also went back to my Access 97 / Excel 97 application and it is now pasting as a graphic.
              If I open the database with the shift key, run the query, and select / copy the records and then paste, the paste is done as text.

              I suspect that using the command “DoCmd.RunCommand acCmdSelectAllRecords” is behaving differently since the installation of Office 2002.

              If I find a solution I will post it.

            • #964282

              Have you try to use DoCmd.TransferSpreadsheet instead of selecting and copying ?

            • #964385

              Good idea! I am in a class this morning, Thursday, and will try this afternoon and get back to you.

    Viewing 0 reply threads
    Reply To: Pasting as graphic instead of text (Access 2002 (10.267.2625))

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: