Relative Content

Tag Archive for excelvbams-word

Setting New Word Document Created From Excel VBA to Landscape Orientation

I have an excel table that I am attempting to create code to export that data to a new MSWord Document, two-columns per page, LANDSCAPE orientation. Admittedly, I am a noob so bear with me. My code is below. I am able to create the two columns in the doc without issues, but the document that is created is not being set to landscape orientation.

Creating a two column MS Word Document using VBA

I am trying to create an MS Word file using VBA (from VBA code running in MS Excel) to move columns of Excel data over to the Word document, but I want the Word document to have two data columns. In other words, each column of the Word doc might have multiple columns of Excel data moved to it. Make sense?

Opening a Word doc using VBA within excel – Word remains minimised

I am writing a VBA routine in excel that creates an rtf file and then opens it in Word. The file opens quite happily (both from explorer and from within Excel). But from within Excel, it remains minimised. The Word icon in the task bar indicates that there is a file open. If I click the Word icon in the task bar, it shows up fine. But I don’t want to have to click the icon, I just want it to appear in front of the Excel window.

Definite way to move between columns in Word VBA (no tables)

I feel like this is ridiculously simple, but I have not been able to find any definite answer for moving between columns in word that are NOT in a table. I have this document with 8 columns and have tried to do things like Selection.MoveRight Unit:= wdColumn, Count:=2 which gives a Bad parameter error and Selection.MoveRight Unit:= wdColumn, Count:=2 which doesn’t do anything.