Results 1 to 9 of 9
  1. #1
    2 Star Lounger
    Join Date
    Jan 2001
    Location
    Mishawaka, Indiana, USA
    Posts
    145
    Thanks
    0
    Thanked 0 Times in 0 Posts

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

    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

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Pasting as graphic instead of text (Access 2002 (10.267.2625))

    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)

  3. #3
    2 Star Lounger
    Join Date
    Jan 2001
    Location
    Mishawaka, Indiana, USA
    Posts
    145
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Pasting as graphic instead of text (Access 2002 (10.267.2625))

    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?

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Pasting as graphic instead of text (Access 2002 (10.267.2625))

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

  5. #5
    2 Star Lounger
    Join Date
    Jan 2001
    Location
    Mishawaka, Indiana, USA
    Posts
    145
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Pasting as graphic instead of text (Access 2002 (10.267.2625))

    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?

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Pasting as graphic instead of text (Access 2002 (10.267.2625))

    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?

  7. #7
    2 Star Lounger
    Join Date
    Jan 2001
    Location
    Mishawaka, Indiana, USA
    Posts
    145
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Pasting as graphic instead of text (Access 200

    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.

  8. #8
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Sint Niklaas, Belgium
    Posts
    2,778
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Pasting as graphic instead of text (Access 200

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

  9. #9
    2 Star Lounger
    Join Date
    Jan 2001
    Location
    Mishawaka, Indiana, USA
    Posts
    145
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Pasting as graphic instead of text (Access 200

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

Posting Permissions

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