×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Excel and Word Automation
2

Excel and Word Automation

Excel and Word Automation

(OP)
I am writing a macro in excel that will copy a specifed range of cells, open a document and paste the cells at a specified bookmark in the document.

On copying the cells, and then selecting the bookmark and giving the selection.paste command, it gives an error "The object does not support this method"

Can someone provide a solution?

RE: Excel and Word Automation

COuld you paste here the line that causes this error?

RE: Excel and Word Automation

ThomasT,
Did you work this macro out ? I'd like a copy if you did...sounds usefull
Thanks,
kook

RE: Excel and Word Automation

2
The following code will give you the general idea on how to resolve this problem:

Sub datatransfer()
' Word document to insert Excel data into
file2$ = "C:\Data\Doc1.doc"
chan = DDEInitiate("WinWord", file2$)
Set rangeToPoke = Worksheets("Sheet1").Range("A1:C5")
' BookMark3 is the name of the BookMark where data will be placed
Application.DDEPoke chan, "BookMark3", rangeToPoke
Application.DDETerminate chan
End Sub

This code works for Office 97 in Windows ME. The preceding code will place the data in the range A1:C5 of the active workbook into an existing bookmark called "BookMark3" in an existing document "Doc1.doc" located in a "Data" folder on the C drive.
The problem with this code is that every time you execute the macro, you get a "YesNO" messagebox asking you if want to start the application WinWord.exe even if it is already running.

RE: Excel and Word Automation

Hi, I'm looking for a Makro or something which help me to get information of a Word-file in Excel. I'm using Office97.

RE: Excel and Word Automation

Well, copy/Paste works best for most cases.
This is preferable to a general macro.
Beyond that, the need has to be defined precisely for a useful specific macro.

RE: Excel and Word Automation

...sorry for the intermission

who knows how to use an excel macro to launch an analysis program?

i have to perform a parametric structural analysis, and i intend to create an excel sheet whith all the parameters data, with a macro that activates the structural program at each iteration and also copies the output at each step

is it too tricky?
i am new to vba, hope i do not bother you!

thanks

RE: Excel and Word Automation

peppiniello:

You should start a new thread for your question.

What is the analysis program? Is it a standalone exe file or is it incorporated in your workbook? This should be pretty simple to do using VBA. We will need more information on how the analysis program is run.

DimensionalSolutions@Core.com
While I welcome e-mail messages, please post all thread activity in these forums for the benefit of all members.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources