Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  HOME    TRACKER    Visual Basic

Insert Text Into Autocad Picture

Ok i dont know if this is by any means possible.
I have several autocad drawings that i copy paste and edit.
Well the only editing i do is the customer info and the measurements
Would it be at all possible since all the info is in the same place to make a set of generic draws lets same vert. tank, horzi tank, pipe. and be able to open up the one i want put that info into the program and have it spit it out on the drawing.

I was thinking of label the areas where the info is Like A1, a2, a3, ect and just use a replace function.

Would this work or is there an easier way?

Thanks in advance


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Insert Dwg In AutoCAD Using VB
Hallo Friends,

I am new here today...searching a code in internet for following problem.

I have a drawing in AutoCAD2005.

I have written a VisualBasic program finding an Appropriate dwg files in Particular folders coz you people know how our Explorer tree form...clicking clicking and so on till we need our particular inorder to minimize the time program works using command buttons and lists all the dwgs in Listview.

now i choose a dwg file in Listview ( i mean its a small drawing which should be inserted in opened drawing ). and click the Button INSERT.
now task is this dwg file which is been selected in Listview shold be inserted in opened autocad drawing.

Please can anybody help me how to write this code for this Button Insert..

Private sub insert_click()
End Sub

it would be very helpfull for me my friends..

i think i have expressed my task in detail..

Thanks - Singoi

Insert Picture In A Text
I have got one problem. I am creating a question bank. The questions are all multiple choice. Now in the question there may be only text or picture or both. Can anybody support with the code how to do this thing and how to store the question. The question should appear exactly in the same way it is inserted before the student.



Insert Text Into Picture
Any one knows how to insert into picture . Somethink like OSD info. The goal is to insert into jpg files some text data. How can this be done? I've search and got nothing like this.

Tks in advance for our replies

Insert Picture And Text Into MsFlexgrid
Is it possible to insert BOTH a small picture and some text into one cell of the flexgrid
Thanks guys

Opening Word Document And Changing Text && Insert Picture
I did a search but did not find much help on this.

I need to know how to modify text in the document, and also how to insert a picture (that is NOT in a file, it's a picturebox in my program)

For example I have to find "FirstName" and replace with actual first name let's say "John Doe" (keeping the same font and formatting).

Also, I need to insert a picture in the document in the top/right corder, and have no clue how.

This is the code I found by searching, and did not find anything to do the rest of what I need...

VB Code:
Option Explicit Private objWord As Word.ApplicationPrivate objDocument As Word.Document Private Sub Form_Load()    Set objWord = New Word.Application        Set objDocument = objWord.Documents.Open("C:Template.doc")End Sub

Any help apreciated, thanks

How To Insert A Small Picture/text Line In The Middle Of MDI Form
I want to insert a small picture or a text line in the middle of a MDI form. Can someone suggest me the way?


Search A Text In Autocad File
Hello everybody!

I want to search a text in a autocad file with VB6 , but I don't know the method and the syntax to arrive at this objective.

Can you help me?



Inserting Text Data In Autocad
Hello Friends,
In Electrical Company I am working I
Design Department need to Insert Electrical Spec. of
component used in Drawings prepared.

Is there any method to insert the same from my
component database?

Is there any plugins already developed?

Please give me directions.


Moving Text From Autocad To Excel
first time user.

I am trying to move text from autocad to excel by using the following Sub.
Result: all text in one column.
What I need, is for all text to be in several columns like the tables in acad.
Public Sub DoIt()

  Dim oEntity As AcadEntity
  Dim oLayout As AcadLayout
  Dim sFile As String
  Dim lFile As Long
    For Each oLayout In ThisDrawing.Layouts
        For Each oEntity In oLayout.Block
            If TypeOf oEntity Is AcadText Or TypeOf oEntity Is AcadMText Then
            sFile = sFile & oEntity.TextString & vbCrLf
        End If
  If VBA.Len(sFile) > 0 Then
    lFile = VBA.FreeFile
    Open "c:Test.XLS" For Output As #lFile
    Print #lFile, sFile
    Close #lFile
  End If

End Sub

Thanks for you help.

AUTOCAD + VB6 : Change Dimension Text
Hello Friends
    I am new for AUTOCAD, I want to develop the VB application which opens a drawing change the dimension text. Previously i had done this, I opened the autocad template file into text stream and replaced the text which i want to change and saved it as a drawing. but it was not proper, because when i changed the text, size of the dimension lines are not change automatically. Dimension lines are appears over the text.
    Now i want to update the text of dimension lines and update the drawing. Also i want to use AUTOCAD commands in VB6.0. I know there are plenty of ways to do this but i have only one day to do this and one of the best solution to this is post the faq to VBCITY. Please! tell me how to solve this?

Waiting for shower of Answers


AutoCAD's Multi Line Text Colour
Does anyone have any idea about how to change AutoCAD' Mtext's Colour

It seems like it can be done with MText you create yourself but not with existing there appears there is now way of referencing each MText.

Does anyone have any ideas?



Insert Picture
Hi all,

I am new to macros in word so assume I know nothing but the basics of inserting a macro into the VBA screen

I write reports and often need to insert a picture ( typical digi camera pic).

The pictures reside in various folders on the harddrive.

Currently I insert a text box and manually insert a picture and then manually resize it to the text box size.

Does anyone have code that I could attach to a button so that when in a text box ~

- It would open up a "get file" dialogue box ( ihope this is the correct term)
- after manual selection of the chosen picture it would continue the insert
_ It would then resize the picture to the size of the text box

I searched a bit and found some clues but my skills are to undeveloped to cobble it together.

btw any alternatives to to this would be appreciated, I intend to have a template with the pic locations preset.

tia kd

Insert Picture
how to insert a picture at run time???

Private Sub mnuInsertPicture_Click()
Dim intfile As Integer
intfile = FreeFile
Open cmOpenFile.FileName For Input As intfile

Image1.Picture = LoadPicture("intfile")
Close #intfile

End Sub

How To Insert Picture
hi all,

How to insert picture file into Access and
SQL Server Data base. Which Field is use for storing
the Picture Files.

S.Suresh Rajkumar

Insert Picture
Hi guys,
How to insert a picture (jpg, bmp, gif) into SQL field ?
I've 3 fields : PathName, FileName, and Picture.
I've already insert path and file name.

at last, i want insert a picture to the last field.
Anyone can help me with this ?


Insert Picture

i have to insert a picture into my database, how can i do that in vb.

i want to display the picture using crystal report8.5.
i tried storing the path and using the path in crystal reports, but ididn't get how to print the picture in crystal report using only thepath.

so now i am trying to store the picture itself into the database so thati can print it easily in crystal reports.
please help

thanx in advance


Insert Picture

I have read many of the other picture questions and answers but none of them seems to meet my criteria. I would like to add a button to my user form allowing me to select a picture (different picture each session). This picture will then be inserted as a logo in the header of my document. I have searched high and low fo th answer. I have the detail of inserting the same picture in a specified area, I have the detail of showing the insert picture dialog box which inserts the picture at the insertion point but cannot get them to work together.

I would really appreciate some help with this. Thanks very much for your time.


Writeline Insert Picture
I am in desperate need for a way to use something like "writeline" to isert a picture. The picture is a small bitmap image of the company logo. Below is a code sample where it needs to "writeline" the picture. The code writes a letter in word, then prints the letter. Forgivemy grammer, i'm new. Any help would be greatly appreciated!

.WriteLine("Company Name" & "code to insert pic")

How To Insert Picture In The Specified Position???

Can any one help me out how to solve the problem explained in the following scenario...

I am developing an application in which through vb coding i need to open an exisitng word document and print text and as well as an image...

I have certain predefined words defined in the word document which should be replaced with the name , date and signature (image ), the predefiend words will be like

what i need to do is, i should find for patientname, date (in the word document) and replace with appropriate name and actual date.
while replacing image,
I could find the 'text' signature ( <<<signature>>> )
but i dont know how to replace an image at that particular position...

The image is available in the form of bmp file ...

the following code i wrote for inserting text and image,
replacement of text works fine but image doesnt...

let me know what modification if i make the code will work fine or anyother better alternative way to do this...

Dim wdApp As Word.Application
Dim wdDoc As Word.Document
Dim wdRange As Word.range
Set wdApp = New Word.Application
Dim myName As String
Dim myDate As String
myName = txtPName.Text
myDate = txtTestDate.Text

Set wdDoc = wdApp.Documents.Open(FileName:="c:dream.doc", ConfirmConversions:=False, ReadOnly:=False)

Set wdRange = wdDoc.range(wdDoc.range.Sentences(1).Start, wdDoc.Sentences(wdDoc.Sentences.Count).End)
With wdRange.Find
.Execute FindText:="<<<patientname>>>", MatchCase:=True, ReplaceWith:="PATIENT NAME : " & myName, Replace:=wdReplaceOne
End With

Set wdRange = wdDoc.range(wdDoc.range.Sentences(1).Start, wdDoc.Sentences(wdDoc.Sentences.Count).End)
With wdRange.Find
.Execute FindText:="<<<date>>>", MatchCase:=True, ReplaceWith:="DATE OF TEST :" & myDate, Replace:=wdReplaceOne
End With

objWord.Selection.InlineShapes.AddPicture FileName:="c:sign.bmp", LinkToFile:=False, SaveWithDocument:=True, range:=objWord.Selection.range


Set wdRange = wdDoc.range(wdDoc.Sentences(wdDoc.Sentences.Count).End - 1, wdDoc.Sentences(wdDoc.Sentences.Count).End - 1)
wdRange.Text = vbTab & vbTab & vbTab & vbTab & vbTab & vbTab & vbTab & vbTab & "2-12-2003" & vbCrLf
Set wdRange = wdDoc.range(wdDoc.Sentences(wdDoc.Sentences.Count).End - 1, wdDoc.Sentences(wdDoc.Sentences.Count).End - 1)
wdRange.Text = vbTab & "SIGNATURE" & vbTab & vbTab & vbTab & vbTab & vbTab & vbTab & vbTab & vbTab & "DATE"
wdApp.Visible = True
wdApp.Visible = True

thanx in advance...

Insert Picture With VBA (in Word 97)

I would like to create a form with a "Browse" button that allows the user to search for a picture, and then takes the file name of the picture and puts it into a textbox. The textbox will not be enabled, so they will not be able to input the name in manually.

When the user finishes inputting the rest of the information that I will ask on the form, they'll click a "Finish" button that will create a page and include the picture that they added.

At this point, I know how to insert a picture if I have a filename. I know how to create a page and make the picture appear on it. The only thing that I do not know, is how to get the "Insert Picture from File" dialog to open up and only provide the filename (and not cause the picture to appear right away). Maybe I need to create my own "Insert Picture from File" dialog box?

Any suggestions?


Insert Picture Dialog Box
I would like to open an insert picture dialog box that points to a specific folder. As my code is now it opens up the "My Pictures" folder automatically. Does anyone know of a way to open a specific folder?

I am currently using the following code:

With Application.Dialogs(wdDialogInsertPicture)
'Bring up InsertPicture Dialog box.
'this is your path and filename
LabelPicPath = .Name
MsgBox "You chose " + LabelPicPath
End With



Insert Picture In Word Doc From VB App
Hi Guys,

I'm working on a project which contains exporting data to a word doc. For now all i had to export was text. My approuch here is that a use a word template which contains home made variables like {&text}. When i create a document with database data, i use the find and replace function and look for the "{&text}". When my vb app find's that text it will replace it with the text that comes from the database.

Now i want to add a new feature. I also want to add pictures to that word document. It would be great if i could use more or less the same method: Find a certain variable in the word doc and replace it with the picture.

Can someone teach me the code to use to add a picture to a word doc?




Can We Insert A Picture Into Excel?
I wanna insert a picture into cells(1,1) and I created a macro like this:
When I run the macro, the dialog pop up..then I don't know how to code after that...Can anyone Help me Please!

How Can I Insert Picture Through DialogBox?
Hi friends. I need your help, Here is my problems:

Problem1: I'm using Excel 2000 and there is a built-in Template when I first installed it. When we click on Command Button ("Insert Logo Here"), a dialog display so we can choose any ".jpg" or ".gif" file from Drive C: then we click INSERT button from Dialog, so the picture from Drive C: will be embed inside Image1 or inside TextBox1 on the Sheet. How can I write this code?

Problem 2: I have a text string "Hello Word" in cells(1,2) and there is a command button below it. When we click on the Command Button("Format Font"), the Font-Dialog display, so we can format the Font in cells(1,2) choosing fontcolor, fontname, fontsize, etc. How can I do that?

Please help me to write this code! Thanks so much!

Dynamically Insert A Picture
I am trying to show an image based on a value pulled from a recordset. The name of the files is actually held within the database. I have tried using image and picture boxes but I cannot seem to get it to work.

My code:

imgDynImage = "G:PathToImage" & datMatches.Recordset.Field("PicName") & ".jpg"

This brings up an object not found error.

Does anyone know how I can acomplish this.


How To Insert Picture In Access
I have a form in vb and a browse button, when i choose picture from browse it inserted the picture in form but how to insert picture in access table when i click save.

PowerPoint Picture Insert
Does anyone know how to insert a picture into PowerPoint with VB when PowerPoint is not visible? This code works fine when the P.P.P. is visible.


Private Sub cmdRun_Click()
On Error GoTo AdoError

Dim ppApp As New PowerPoint.Application
Dim ppPres As New PowerPoint.Presentation

Set ppApp = New PowerPoint.Application
ppApp.Presentations.Add WithWindow:=msoTrue
Set ppPres = ppApp.Presentations.Item(1)
ppPres.Slides.Add 1, ppLayoutBlank
PicturePath = Me.lstPath.List(0) & "" & Me.lstFiles.List(0)
ppPres.Slides(1).Shapes.AddPicture(FileName:=PicturePath, LinkToFile:=msoFalse, SaveWithDocument:=msoTrue, Left:=0, Top:=0, Width:=100, Height:=100).Select

Picture Won't Insert Into Access

I've made a access database with 1 table. This table has a field which is a binary field called pic. I'm using the code below to place a picture into a picture box called picfields(3) which is bound through code to the table field pic. My problem is that the picture isn't placed into the table. as soon as I refresh or update the table the picture disapears. Can anyone help? Thanks

VB Code:
Private Sub Command1_Click()On Error Resume NextCommonDialog1.CancelError = TrueCommonDialog1.DialogTitle = "Open a Picture"CommonDialog1.FileName = ""CommonDialog1.Filter = "Pictures(*.bmp;*.ico;*.wmf)|*.bmp;*.ico;*.wmf"CommonDialog1.FilterIndex = 1CommonDialog1.Flags = cdlOFNCreatePrompt CommonDialog1.ShowOpenpicFields(3).Picture = LoadPicture(CommonDialog1.FileName) If Err = cdlCancel Then Exit Sub

How To Insert Picture To MSWord??
Please how can i input picture to MSWord
I seems to be able to find command such as insertafter,insertautotext,insertfile but no insertpicture.
Any help would be much appreciated.

Insert Picture File
hi there,

I want to insert picture file during run time using picture box control
how should i do ?

thans for a help.

Insert A Picture Into MS Access Via VB
Dear Friends,

How can i store a picture in MS Access through Visual Baisc. Can U Guys give some idea about this Plz.

Thanks & regards,

Insert Picture Into Form
hai all,
please tell me how to insert picture in to form. i am create form with command button. but when i click on command button. but when click button always error. this is form view.
[IMG] _zero/formpicture.jpg[/IMG]
and this a script.
Private Sub add_picture_Click()
' Use the Office File Open dialog to get a file name to use

' as an employee picture.

End Sub
Sub getFileName()

' Displays the Office File Open dialog to choose a file name

' for the current employee record. If the user selects a file

' display it in the image control.

Dim fileName As String

Dim result As Integer

With Application.FileDialog(msgFileDialogFilePicker)

.Title = "Select Employee Picture"

.Filters.Add "All Files", "*.*"

.Filters.Add "JPEGs", "*.jpg"

.Filters.Add "Bitmaps", "*.bmp"

.FilterIndex = 3

.AllowMultiSelect = False

.InitialFileName = CurrentProject.path

result = .Show

If (result <> 0) Then

fileName = Trim(.SelectedItems.Item(1))

Me![ImagePath].Visible = True


Me![ImagePath].Text = fileName


Me![ImagePath].Visible = False

End If

End With
End Sub

help me please :(

How To Insert Picture In Oralce With Vb
how to insert picture in oralce with vb ...?

How To Insert A Picture In SQL Server Using VB 6.0
Hi Friends,

How are you all? Hope you all are doing will.

I am trying to insert a picture file in to SQL Server database using VB 6.0. Any kind of code of example will be appreciated.



How Do You Insert A Picture In The Report

     I work in a small business company and don't have crystal report or seagate. How can I insert a picture (from picture box to my report)? I'm just using the text report generation using series of print command after opening a file for input as
      Open app.path & "filename.txt" for output as #1

     If this is not possible, how can I redirect my text file to word document and eventually insert the picture? Any reply and sample code will be appreciated. Thank you very much in advance.


Insert Picture In Excel

I have a Form with a PictureBox. How can I insert this picture from a PictureBox in the Excel sheet?

Do I have to save it as a file and then insert it using ActiveSheet.Picture.Insert? Or there is a simplier way of doing it?


Insert Picture In Excel From VB

I'm trying to insert a picture into a header of Excel, but I can't seem to make it happen. Anyone has any suggestions?


AutoCAD With VB(A) Without Opening AutoCAD
Hi everybody.

Do you know a way to use AutoCAD with vb or vba without opening AutoCAD. I would like to draw files or to use AutoCAD possibilities without opening AutoCAD. Is there an .OCX or something like that ? Any other idea ?

How To Use Autocad, Without Installing Autocad
i program vb6 sp5 applications that use the autocad drawing engine, this works fine for most all applications as autocad is installed on the target machine, but now have run into a problem where the target machine won't have autocad installed. how do you create an instance of autocad without having autocad installed on the target machine???


vegetarian is indian word for lousy hunter.....

Picture Insert In Picture Box
Im new at this and was looking for a little help to get a picture inserted into a picture box. This will be a dynamic picture of employees. To get the initial picture I guess it would be an open file Windows box but I have not used one yet. Any help would be appreciated.

Thanks alway!

Insert A Picture Into A Cell Of Flexgrid
Hi! Is possible to insert a picture (*.gif or *.jpg) into a cell of flexgrid?

How To Insert A Picture To The Form With VBA Code?
Dear all,
I have made a form for my new database. I added a bound object frame. Now I want to insert picture to my form. I know how to insert it by right clicking the frame and then select "Insert Object...." on the pop up menu. This procedure seems to be inelegant, because I want my user to insert the pic just by clicking a button.

I want to make a button, name it "Insert Picture" button, and just by clicking the button, Access will open Dialog Window, and I can select the file I want to insert to my form. The problem is, I just don't know how to make the VBA code for this button.

Can anyone help me how to make the VBA code for this problem? Please let me know. Thank you for you kind attention.



How Do You Insert A Picture Into The Page Setup?
I have a picture I want to insert into the page I am printing. Anyone know what I need to do to tell it what pic and where to put it? Sorry if this is basic...still learning.

Insert Picture Into An Excel File.
Hi there,
Pls let me know how to insert a picture into an Excel file
Thank you very much.

Auto Resize Picture After Insert
I created a macro to insert picture and after insert the picture will auto resize and fit into my range (BO1).
Please advice

Dim x As Variant

x = Application.GetOpenFilename("Pictures (*.jpg;*.bmp;*.gif), *.jpg;*.bmp", , "Select Picture")
If x = False Then Exit Sub 'no file selected
Set mypic = ActiveSheet.Pictures.Insert(x)
With mypic
.Left = Range("BO1").Left
.Top = Range("BO1").Top

End With

Report Error On Picture Insert.
Hi there all. Has anyone come across a fatal error when inserting a picture into a report. I am using VB6 from the visual studio package and have installed SP3. Please let me know how to get around this as the error is now coming up every time I enter reporting mode.

How To Use The Insert Picture Form From Excel
I want to use the insert picture form which appear when you click the main toolbarinsertpicturefrom files. and then get the path of the file


RichText =&gt; Can Insert Link Or Picture In It?
For Example
If i have following text in Richtext :

1. Link to
2. Link to
3. Link to

And do something when click on each line .

How can I do that ?
And can Insert any Icon in it?

Best Regards

Insert A Picture In A Dbase Form
I am planning to build a small dbase (Access / VB) and would like one of the fields to be a actual picture.

My question how do I present the user with a way to attach a picture and display it in the record.



Copyright 2005-08, All rights reserved