special characters from vba
good morning
thank you for your kind help.
Ill give it a shot at the table design.
Best Regards.
Pedro Leite
----------------------------------------------
"NickHK" escreveu na mensagem
...
Pedro,
You can record a macro in Word that will give the basis of the required
code. Running that from Excel generally mean adding a Word object variable
to beginning of statements.
Dim WordApp as Word.Application
Set WordApp = New Word.Application
WordApp.Documents.Add
ActiveDocument.Tables.Add Range:=Selection.Range, NumRows:=5, NumColumns:=
_
3, DefaultTableBehavior:=wdWord9TableBehavior, AutoFitBehavior:= _
wdAutoFitFixed
As for using text only costruction, again record a macro whilst you insert
some symbols. You should get something like :
Selection.InsertSymbol Font:="Courier New", CharacterNumber:=9484,
Unicode:=True
Selection.InsertSymbol Font:="Courier New", CharacterNumber:=9492,
Unicode:=True
But I must say, use Word's table feature instead of drawing it yourself.
NixkHK
"Pedro Leite" <naoehpreciso wrote in message
...
hi.
hmmm, lets say that my skills on "piloting" word from excel using vba are
not very deep to say the least.
i found the ascii approach simple and sufficient for my purpose. this
report
is just a summary of orders to be printed on completion and filed
together
with the original po. in the mean time, i fiddled a bit with tables but
if
i
can make the report neater with the ascii chars i would call it closed.
anyway, thank you for your suggestion that ill pursuit. if not for other
reason, to learn. otoh, if you know how to force those special
characters,
it would be nice.
thank you in advance
Pedro Leite
--------------------------------------------------------------------------
-----------------------------
"NickHK" escreveu na mensagem
...
Pedro,
Why not use the capability of Word and insert a table .
Or do you need to use ASCII characters for some reason ?
NickHK
"Pedro Leite" <naoehpreciso
bl...
Good Morning
I have a bit of code that opens a new word doc, fill the document with
excel data, prints, close and so on
the thing is, the document is tabular and is limeted in row and
columns
with " - " and " | "
example : ( make the window larger to fit )
now what i want is to use the box drawing characters available in the
extended ascii table ( corners, junction lines and so on ) asc 186 ,
205
and some others.
the font used is courier new and has a sub set, called box drawing
that
has these caracters. how can i use them ??
thank you
Pedro Leite from Portugal.
-------------------------------------------------------------------------
------------------------------------------------
|Preto 800 |
|Nec- 775,0|Stk- 162,0|Enc- 613,0|Est- -55,0|Rec-
558,0|Csm- 720,0|Exc- 0,0|Sob- 0,0|
|Nec- 47,0|Stk- 64,0|Enc- -16,0|Est- 46,0|Rec-
30,0|Csm- 94,0|Exc- 49,0|Sob- 0,0|
|---------------------------------------------------------------------------
--------------------------------------------|
| |
|---------------------------------------------------------------------------
--------------------------------------------|
| |
|---------------------------------------------------------------------------
--------------------------------------------|
| |
|---------------------------------------------------------------------------
--------------------------------------------|
| |
|---------------------------------------------------------------------------
--------------------------------------------|
| |
|---------------------------------------------------------------------------
--------------------------------------------|
| |
-------------------------------------------------------------------------
------------------------------------------------
|