I am stuck up with a problem. I need to send record set data as well as image to word document dynamically.For this problem could some one please provide me solution.
1.Is it possible with to send image/picture to file using Scripting.FileSystemObject and writeline method.
2. without using either bookmarks or range can i insert spaces before text using word.application so that i can send text and images without preformated template.
puts data (from recordset) in a Table and
an Image (from a file) into a new word doc
Enjoy
...at present time, using mainly Net 4.0, Vs 2010
Special thanks to Lothar "the Great" Haensler, Chris Eastwood , dr_Michael, ClearCode, Iouri and
all the other wonderful people who made and make Codeguru a great place.
Come back soon, you Gurus.
Are you creating the document by hand or with an app/macro?
In case you're doing it by hand, just select the table. Right-click and select "Borders and shading". Under the tab "Borders" select the setting "None", then just press "Ok".
Your borders have disappered.
sorry for not posting question properly. Using visual basic i am automating word document dynamically. i need to create table hiding grid lines i.e horizontal and vertical lines. Also i need to create another table with two columns .Though i had given wrdApp.Selection.EndKey unit:=wdStory and trying to create table .....the second table is creating befor the first table.
Sorry for asking such a big lengthy question.I would be greatful if any one could pl. help me show a link to any article or giving me piece of code to work with automating word and formating word body i.e using one table after another hiding lines so that text is formatted and looks neat.
Please, post inside this thread, unless you're asking for something
completely different...
An easy way to get clue on how to perform what you want is using
Macro-recprder from word:
Open a doc, search menu for MAcro, register one (for current doc, not for
Normal.Dot!), Insert a table, make border transparent. When you have done,
stop registering macro.
Now go to same menu and see: Vb editor.
Choose it, and via Project explorer go o see the module that has been added.
There you will find VBA code, which is quite the same as Vb and a good starting
point to learn how to deal with Word inside Vb
...at present time, using mainly Net 4.0, Vs 2010
Special thanks to Lothar "the Great" Haensler, Chris Eastwood , dr_Michael, ClearCode, Iouri and
all the other wonderful people who made and make Codeguru a great place.
Come back soon, you Gurus.
Recordset data contains rtf format hence when i am using
wrdselection.typetext rec(0)
where wrdselection is word.selection type
following is saved in my word document .How can just get text part from the below rtf format.
{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset0 Verdana;}}
\viewkind4\uc1\pard\f0\fs20 (I)Give two uses of convex and concave Mirror.[2]
\par (II)Calculate the number of images formed when object is placed between two plane mirrors inclined at a angle of 60 degree[2]\fs20
\par }
A trick is:
Save it with a different name in plain text. read the different file name and get the
text.
Another is:
Select all, assign it to the Textrtf property of a hidden richtextbox
and then get the Text proprety from it
A third way :
Look to see if you can find a word property or a word method that gan give you
text instead of rtftext....
...at present time, using mainly Net 4.0, Vs 2010
Special thanks to Lothar "the Great" Haensler, Chris Eastwood , dr_Michael, ClearCode, Iouri and
all the other wonderful people who made and make Codeguru a great place.
Come back soon, you Gurus.
* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.