K
Kimberly3626
Hi all.
I currently have a template with a VBA form that allows my users to enter
data and have my report auto-build.
Unfortunately, I will need to be able to add an image to the document (along
with a caption) using the form mentioned above. I have managed to get the
image to be inserted into the document, but there are some issues.
First, the image is inserted at the beginning of the page. Not at the
bookmark. Of course, this is because I haven't associated the image with a
bookmark yet...no clue how to. Go figure.
Second, there is no user confirmation of the filename for the image selected
on the form.
I have a fairly simple solution, but I'm not sure how to put it into the code.
1. User clicks button next to text box.
2. Dialog opens allowing user to select a file from the pc.
3. Document name fills into the text box on the form which is next to said
button.
4. When user clicks 'submit' on the form, the code ties that filename to the
actual file and inserts it into the document AT MY BOOKMARK!!! =)
This process will need to be repeated multiple times, but there is no set
amount of times. As a result, I am putting about 5 bookmarks in for the
images (all on top of each other) and will need to put the line breaks into
the form to force the lines to move down if an image is inputted... (I think
I might be able to handle that part...MIGHT) If no image, the bookmarks just
sit next to the first picture harmlessly. There will always be at least one
image, but how many there will acutally be in the end will vary...
The basic text-inserts of the form are working beautifully, so I don't seem
to need any help there right now. What I need is a simple code sample that
will get me through steps 1 through 4 above. I can manipulate it to
accomodate my filenames and requirements, but I don't know where to begin!!!
Thanks in advance to anyone able or willing to help!
Kim
I currently have a template with a VBA form that allows my users to enter
data and have my report auto-build.
Unfortunately, I will need to be able to add an image to the document (along
with a caption) using the form mentioned above. I have managed to get the
image to be inserted into the document, but there are some issues.
First, the image is inserted at the beginning of the page. Not at the
bookmark. Of course, this is because I haven't associated the image with a
bookmark yet...no clue how to. Go figure.
Second, there is no user confirmation of the filename for the image selected
on the form.
I have a fairly simple solution, but I'm not sure how to put it into the code.
1. User clicks button next to text box.
2. Dialog opens allowing user to select a file from the pc.
3. Document name fills into the text box on the form which is next to said
button.
4. When user clicks 'submit' on the form, the code ties that filename to the
actual file and inserts it into the document AT MY BOOKMARK!!! =)
This process will need to be repeated multiple times, but there is no set
amount of times. As a result, I am putting about 5 bookmarks in for the
images (all on top of each other) and will need to put the line breaks into
the form to force the lines to move down if an image is inputted... (I think
I might be able to handle that part...MIGHT) If no image, the bookmarks just
sit next to the first picture harmlessly. There will always be at least one
image, but how many there will acutally be in the end will vary...
The basic text-inserts of the form are working beautifully, so I don't seem
to need any help there right now. What I need is a simple code sample that
will get me through steps 1 through 4 above. I can manipulate it to
accomodate my filenames and requirements, but I don't know where to begin!!!
Thanks in advance to anyone able or willing to help!
Kim