• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 573
  • Last Modified:

VBA translation of word macro.

Dear Experts,

I need to translate a certain word macro. I heard it might be difficult.

I am an extreme new-bie for VB. I am suggested to use VBA. I dont know how VBA differs from VB.

I hope you might have suggestion for me in translating a certain word macro using VBA.

  • 2
  • 2
1 Solution
Word macros always use VBA, unless it was for Word 6 or earlier, which used Wordbasic.
VB6 and VBA code for Office 2000 are basically the same.

The environment is different so you have to get hold of the Word Objects to run the code for you.

I suggest that you set a reference (Project/References) to the Microsoft Word Object library, then

Dim wdAppl as Word.Application
Dim Doc as Word.Document
Set wdAppl as New Word.Application
Set Doc = wdAppl.Documents.Open("C:\myfolder\mydoc.doc")

Within Word the Application object is implicit and need not be stated. If it is the keyword Application is always used.

the equivalent of the last line could be

Set Doc = Application.Documents.Open("C:\myfolder\mydoc.doc")
Set Doc = Documents.Open("C:\myfolder\mydoc.doc")

It might  be an idea to post some of the code (or all if it isn't very long)
ldbkuttyAuthor Commented:
Thanks for your help and Sorry for this late reply. I am out of this task now. I hope to get back in 2 or 3 days.
Looking forward to it.
ldbkuttyAuthor Commented:
Seems it will take time for me to get the word macro. I'll close the Question now and come back with some new Q Links.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now