Chart to Word - How to? (1 Viewer)

darbid

Registered User.
Local time
Today, 11:35
Joined
Jun 26, 2008
Messages
1,428
I see that this question is not so liked

http://www.access-programmers.co.uk/forums/showthread.php?t=34660&highlight=chart+word

http://www.access-programmers.co.uk/forums/showthread.php?t=34660&highlight=chart+word

http://www.access-programmers.co.uk/forums/showthread.php?t=34660&highlight=chart+word

There are some references to MS Knowledge base but that has not helped me.

I want to send a chart either report or on a from directly to word.

I have found a copy/past method but cannot get it to work

Code:
stDocName = "frm_ClaimChart"

DoCmd.OpenForm stDocName
    Set frm = Forms!frm_ClaimChart
    
    Set ctl = Forms!frm_ClaimChart.OLEUnbound0
    frm(ctl.Name).SetFocus
    DoCmd.RunCommand acCmdCopy

    With wd
        .Visible = True
        .Documents.Add
        .Selection.PasteSpecial False, wdPasteOLEObject, wdFloatOverText, False
    End With
    Set wd = Nothing

It must be my limited experience with charts and access. If my set ctl is correct then I have a problem with the SetFocus as Access says I cannot do this.

How can I fix this?

Or does anyone have another suggestion of inserting a chart directly into word.
 

WayPay

Registered User.
Local time
Today, 11:35
Joined
Nov 3, 2008
Messages
118
I can't even do that manually; Copy is disabled. I don't have a solution to that.

Just a suggestion: I found Excel to be a better tool to make charts with. You could pull the data from Access to Excel, do the chart in Excel and do the Copy/Pasting to Word in an Excel macro. That way you even have a Macro Recorder to generate most of the necessary VBA for you :).
 

darbid

Registered User.
Local time
Today, 11:35
Joined
Jun 26, 2008
Messages
1,428
I can't even do that manually; Copy is disabled.
ahhhh the simple things!

Ok I was resisting using Excel as I have already got reports going to Word and Powerpoint so why not add Excel to the list.

Thank you.
 

Users who are viewing this thread

Top Bottom