Help with Word VBA in Access

T

Ted

Hi all,

I need to create a document from an Access record. I don't think I can use a
report because there are so many variables. If certain things are checked it
will be in the document if it isn't i need the document to shift so there
won't be any white space.

The problem is I may print [InsuredName] on one line and then at column 130
on the same line I need to print the [CompanyName]. I tried tabbing after
[InsuredName] but that won't work bc some letters are wider than others.
There is no way to know how many Tabs I'll need after [InsuredName] to
get to column 130.

I tried using objWord.selection.Information(wdFirstCharacterColumnNumber)
but Access didn't recognize the constant wdFirstCharacterColumnNumber.

Any help would be very much appreciated!

TIA
Ted

btw...my company is in the Stone Age....we're still using Office 97
 
H

Helmut Weber

Hi Ted,
use 9 (number 9) instead of wdFirstCharacterColumnNumber
msgbox selection.Information(9).
And try to learn about early binding vs. late binding.

But using 9 instead of wdFirstCharacterColumnNumber
wan't help you anyway,
when using a font that is not monospaced, like Courier New.

You'll need inches or points or centimeters, for placing a tab.

Ask again, if you need more detailed help.

Greetings from Bavaria, Germany

Helmut Weber, MVP
"red.sys" & chr(64) & "t-online.de"
Word XP, Win 98
http://word.mvps.org/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top