Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
Antony
 
Posts: n/a
Default Load Picture using Bookmarks

I am an Oralce forms developer and I am trying to create a word doc using
OLE2. The doc contains a picture and I need to pass the filename from Oracle
Forms.
So far I have created some bookmarks and am able to find bookmarks and
replace them with text. But I am unable to do the same for Picture. I tried
with {IncludePicture bookmark1} . It didnt work. Can someone point me some
documents reg replacing bookmarks with filenames to load picture.

Thanks
Antony.
  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Jay Freedman
 
Posts: n/a
Default Load Picture using Bookmarks

Antony wrote:
I am an Oralce forms developer and I am trying to create a word doc
using OLE2. The doc contains a picture and I need to pass the
filename from Oracle Forms.
So far I have created some bookmarks and am able to find bookmarks and
replace them with text. But I am unable to do the same for Picture. I
tried with {IncludePicture bookmark1} . It didnt work. Can someone
point me some documents reg replacing bookmarks with filenames to
load picture.

Thanks
Antony.


The "bookmark1" inside the IncludePicture field must be converted to a
field. Select the word bookmark1 and press Ctrl+F9 to add the inner set of
braces, so it appears as

{IncludePicture {bookmark1} }

Then update the fields, and you should see the picture whose path is in the
bookmark. After your Oracle form updates the content of the bookmark, you'll
have to update the IncludePicture field again to get the new picture to
show.

Technically, a field whose code consists of only a bookmark name is
shorthand for the corresponding Ref field; its result is the content of the
bookmark.

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.


  #3   Report Post  
Posted to microsoft.public.word.docmanagement
Antony
 
Posts: n/a
Default Load Picture using Bookmarks

If I write the filename to a textfile, Can word (macro) read the filename and
load the image ??

Antony.

"Antony" wrote:

I am an Oralce forms developer and I am trying to create a word doc using
OLE2. The doc contains a picture and I need to pass the filename from Oracle
Forms.
So far I have created some bookmarks and am able to find bookmarks and
replace them with text. But I am unable to do the same for Picture. I tried
with {IncludePicture bookmark1} . It didnt work. Can someone point me some
documents reg replacing bookmarks with filenames to load picture.

Thanks
Antony.

  #4   Report Post  
Posted to microsoft.public.word.docmanagement
Antony
 
Posts: n/a
Default Load Picture using Bookmarks

Thanks for the reply Jay.

Well I inserted a word field by Ctrl F9 and did the following
{IncludePicture {}}. The problem is how do I see the bookmark. If I do
Insert/Bookmark within the inner curly braces, how do I save it ?

Basically If I do
{IncludePicture "C:\\test.jpg" \d} and press F9 gets me the picture. But I
am unable to do the same by passing the "C:\\test.jpg" as bookmark.
Sorry If I asking a very silly qn or something as this is my first ever word
project.

Thanks
Antony.

"Jay Freedman" wrote:

Antony wrote:
I am an Oralce forms developer and I am trying to create a word doc
using OLE2. The doc contains a picture and I need to pass the
filename from Oracle Forms.
So far I have created some bookmarks and am able to find bookmarks and
replace them with text. But I am unable to do the same for Picture. I
tried with {IncludePicture bookmark1} . It didnt work. Can someone
point me some documents reg replacing bookmarks with filenames to
load picture.

Thanks
Antony.


The "bookmark1" inside the IncludePicture field must be converted to a
field. Select the word bookmark1 and press Ctrl+F9 to add the inner set of
braces, so it appears as

{IncludePicture {bookmark1} }

Then update the fields, and you should see the picture whose path is in the
bookmark. After your Oracle form updates the content of the bookmark, you'll
have to update the IncludePicture field again to get the new picture to
show.

Technically, a field whose code consists of only a bookmark name is
shorthand for the corresponding Ref field; its result is the content of the
bookmark.

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.



  #5   Report Post  
Posted to microsoft.public.word.docmanagement
Jay Freedman
 
Posts: n/a
Default Load Picture using Bookmarks

Hi Antony,

If Oracle requires you to use a bookmark to tell Word the name of the
picture, that bookmark is going to have to be outside the IncludePicture
field. Only the *name* of the bookmark goes inside the inner field, like

{IncludePicture {bookmark1} \d }

The text C:\test.jpg would be somewhere else in the document, and the
bookmark named bookmark1 would surround that text.

I don't know what other ways Oracle has of passing information to Word. In
another branch of the thread you suggested writing the picture's file name
into a text file. While that seems like it ought to work (using a nested
{IncludeText} field in place of the {bookmark1} field), it fails because the
result of the IncludeText field ends with a paragraph mark that makes the
file name invalid.

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

Antony wrote:
Thanks for the reply Jay.

Well I inserted a word field by Ctrl F9 and did the following
{IncludePicture {}}. The problem is how do I see the bookmark. If I do
Insert/Bookmark within the inner curly braces, how do I save it ?

Basically If I do
{IncludePicture "C:\\test.jpg" \d} and press F9 gets me the picture.
But I am unable to do the same by passing the "C:\\test.jpg" as
bookmark. Sorry If I asking a very silly qn or something as this is
my first ever word project.

Thanks
Antony.

"Jay Freedman" wrote:

Antony wrote:
I am an Oralce forms developer and I am trying to create a word doc
using OLE2. The doc contains a picture and I need to pass the
filename from Oracle Forms.
So far I have created some bookmarks and am able to find bookmarks
and replace them with text. But I am unable to do the same for
Picture. I tried with {IncludePicture bookmark1} . It didnt work.
Can someone point me some documents reg replacing bookmarks with
filenames to load picture.

Thanks
Antony.


The "bookmark1" inside the IncludePicture field must be converted to
a field. Select the word bookmark1 and press Ctrl+F9 to add the
inner set of braces, so it appears as

{IncludePicture {bookmark1} }

Then update the fields, and you should see the picture whose path is
in the bookmark. After your Oracle form updates the content of the
bookmark, you'll have to update the IncludePicture field again to
get the new picture to show.

Technically, a field whose code consists of only a bookmark name is
shorthand for the corresponding Ref field; its result is the content
of the bookmark.

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.





  #6   Report Post  
Posted to microsoft.public.word.docmanagement
Antony
 
Posts: n/a
Default Load Picture using Bookmarks

Jay,

Thanks for the reply. As of now the only way I can pass some information to
Word is thru Bookmark. And I can pass only the filename. Is it possible to
use some kind of macro or something to load the picture while opening the
document ?.

Or going back to my thought of writing the filename into a text file, Can I
not mail merge this ?.

Antony.

"Jay Freedman" wrote:

Hi Antony,

If Oracle requires you to use a bookmark to tell Word the name of the
picture, that bookmark is going to have to be outside the IncludePicture
field. Only the *name* of the bookmark goes inside the inner field, like

{IncludePicture {bookmark1} \d }

The text C:\test.jpg would be somewhere else in the document, and the
bookmark named bookmark1 would surround that text.

I don't know what other ways Oracle has of passing information to Word. In
another branch of the thread you suggested writing the picture's file name
into a text file. While that seems like it ought to work (using a nested
{IncludeText} field in place of the {bookmark1} field), it fails because the
result of the IncludeText field ends with a paragraph mark that makes the
file name invalid.

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

Antony wrote:
Thanks for the reply Jay.

Well I inserted a word field by Ctrl F9 and did the following
{IncludePicture {}}. The problem is how do I see the bookmark. If I do
Insert/Bookmark within the inner curly braces, how do I save it ?

Basically If I do
{IncludePicture "C:\\test.jpg" \d} and press F9 gets me the picture.
But I am unable to do the same by passing the "C:\\test.jpg" as
bookmark. Sorry If I asking a very silly qn or something as this is
my first ever word project.

Thanks
Antony.

"Jay Freedman" wrote:

Antony wrote:
I am an Oralce forms developer and I am trying to create a word doc
using OLE2. The doc contains a picture and I need to pass the
filename from Oracle Forms.
So far I have created some bookmarks and am able to find bookmarks
and replace them with text. But I am unable to do the same for
Picture. I tried with {IncludePicture bookmark1} . It didnt work.
Can someone point me some documents reg replacing bookmarks with
filenames to load picture.

Thanks
Antony.

The "bookmark1" inside the IncludePicture field must be converted to
a field. Select the word bookmark1 and press Ctrl+F9 to add the
inner set of braces, so it appears as

{IncludePicture {bookmark1} }

Then update the fields, and you should see the picture whose path is
in the bookmark. After your Oracle form updates the content of the
bookmark, you'll have to update the IncludePicture field again to
get the new picture to show.

Technically, a field whose code consists of only a bookmark name is
shorthand for the corresponding Ref field; its result is the content
of the bookmark.

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.




  #7   Report Post  
Posted to microsoft.public.word.docmanagement
Jay Freedman
 
Posts: n/a
Default Load Picture using Bookmarks

Hi Antony,

Yes, you can mail merge the file names from an external file. See
http://www.gmayor.com/mail_merge_graphics.htm for instructions. (I
should have thought of that earlier, but I don't do a lot of mail
merges and it's usually the last thing I think of. Sorry!)

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.

On Wed, 22 Feb 2006 14:05:34 -0800, Antony
wrote:

Jay,

Thanks for the reply. As of now the only way I can pass some information to
Word is thru Bookmark. And I can pass only the filename. Is it possible to
use some kind of macro or something to load the picture while opening the
document ?.

Or going back to my thought of writing the filename into a text file, Can I
not mail merge this ?.

Antony.

"Jay Freedman" wrote:

Hi Antony,

If Oracle requires you to use a bookmark to tell Word the name of the
picture, that bookmark is going to have to be outside the IncludePicture
field. Only the *name* of the bookmark goes inside the inner field, like

{IncludePicture {bookmark1} \d }

The text C:\test.jpg would be somewhere else in the document, and the
bookmark named bookmark1 would surround that text.

I don't know what other ways Oracle has of passing information to Word. In
another branch of the thread you suggested writing the picture's file name
into a text file. While that seems like it ought to work (using a nested
{IncludeText} field in place of the {bookmark1} field), it fails because the
result of the IncludeText field ends with a paragraph mark that makes the
file name invalid.

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

Antony wrote:
Thanks for the reply Jay.

Well I inserted a word field by Ctrl F9 and did the following
{IncludePicture {}}. The problem is how do I see the bookmark. If I do
Insert/Bookmark within the inner curly braces, how do I save it ?

Basically If I do
{IncludePicture "C:\\test.jpg" \d} and press F9 gets me the picture.
But I am unable to do the same by passing the "C:\\test.jpg" as
bookmark. Sorry If I asking a very silly qn or something as this is
my first ever word project.

Thanks
Antony.

"Jay Freedman" wrote:

Antony wrote:
I am an Oralce forms developer and I am trying to create a word doc
using OLE2. The doc contains a picture and I need to pass the
filename from Oracle Forms.
So far I have created some bookmarks and am able to find bookmarks
and replace them with text. But I am unable to do the same for
Picture. I tried with {IncludePicture bookmark1} . It didnt work.
Can someone point me some documents reg replacing bookmarks with
filenames to load picture.

Thanks
Antony.

The "bookmark1" inside the IncludePicture field must be converted to
a field. Select the word bookmark1 and press Ctrl+F9 to add the
inner set of braces, so it appears as

{IncludePicture {bookmark1} }

Then update the fields, and you should see the picture whose path is
in the bookmark. After your Oracle form updates the content of the
bookmark, you'll have to update the IncludePicture field again to
get the new picture to show.

Technically, a field whose code consists of only a bookmark name is
shorthand for the corresponding Ref field; its result is the content
of the bookmark.

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.




  #8   Report Post  
Posted to microsoft.public.word.docmanagement
Alisa L
 
Posts: n/a
Default Load Picture using Bookmarks

Is the issue the syntax of the INCLUDEPICTURE field? I also use bookmarks to
insert path/filename into the field, but the syntax that works for me is the
following:

{INCLUDEPICTURE "{REF Bookmarkname}"}

The REF field inserts the contents of the bookmark into the INCLUDEPICTURE
field, vs just the bookmark name itself.

Alisa

"Antony" wrote:

If I write the filename to a textfile, Can word (macro) read the filename and
load the image ??

Antony.

"Antony" wrote:

I am an Oralce forms developer and I am trying to create a word doc using
OLE2. The doc contains a picture and I need to pass the filename from Oracle
Forms.
So far I have created some bookmarks and am able to find bookmarks and
replace them with text. But I am unable to do the same for Picture. I tried
with {IncludePicture bookmark1} . It didnt work. Can someone point me some
documents reg replacing bookmarks with filenames to load picture.

Thanks
Antony.

Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
saving inserted picture file as a .jpeg CIW Microsoft Word Help 3 December 22nd 05 03:09 AM
format picture bookmarks within templates iwsifina Microsoft Word Help 1 September 25th 05 06:57 AM
Pause macro to select a picture Varls New Users 0 July 18th 05 12:20 PM
Help Word Picture Problem WayneB Microsoft Word Help 1 June 10th 05 06:19 AM
MS Word Picture Object tj Microsoft Word Help 0 January 26th 05 03:09 AM


All times are GMT +1. The time now is 11:13 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"